Skip to content

Instantly share code, notes, and snippets.

@curiouslychase
Last active December 28, 2015 15:39
Show Gist options
  • Save curiouslychase/7522958 to your computer and use it in GitHub Desktop.
Save curiouslychase/7522958 to your computer and use it in GitHub Desktop.
grunt.initConfig({
// ...other plugins
jshint: {
files: [
'Gruntfile.js',
'cookiejar.js',
'test/*.js'
]
}, // ...other plugins
});
grunt.initConfig({
// ...other plugins
mocha: {
all: ['test/cookiejar.html'],
options: {
run: true
}
}, // ...other plugins
});
grunt.initConfig({
// ...other plugins
notify_hooks: {
options: {
enabled: true,
max_js_hint_notifications: 5,
title: 'Cookiejar'
}
}, // ...other plugins
});
grunt.registerTask('dev', ['watch', 'notify_hooks']);
grunt.initConfig({
// ...other plugins
pkg: grunt.file.readJSON('package.json'),
uglify: {
all: {
options: {
banner: '/*! <%= pkg.name %>-v<%= pkg.version %> (<%= pkg.repository.url %>) ' +
'<%= grunt.template.today("yyyy-mm-dd") %> */\n'
},
files: {
'cookiejar.min.js': ['cookiejar.js']
}
}
}, // ...other plugins
});
grunt.initConfig({
watch: {
options: {
livereload: true
},
scripts: {
files: [
'Gruntfile.js',
'cookiejar.js',
'test/spec/cookiejar.js'
],
tasks: [
'jshint', 'mocha'
]
}
}, // ...other plugins
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment