Skip to content

Instantly share code, notes, and snippets.

@jakepruitt
Created October 1, 2014 04:35
Show Gist options
  • Select an option

  • Save jakepruitt/95880d999485c8fca972 to your computer and use it in GitHub Desktop.

Select an option

Save jakepruitt/95880d999485c8fca972 to your computer and use it in GitHub Desktop.
Splitting grunt tasks
module.exports = function (grunt) {
// Load the project's grunt tasks from a directory
require('grunt-config-dir')(grunt, {
configDir: require('path').resolve('tasks')
});
// Register group tasks
grunt.registerTask('build', [ 'jshint', 'stylus', 'browserify', 'i18n', 'copyto' ]);
grunt.registerTask('test', [ 'jshint', 'mochacli' ]);
};
'use strict';
module.exports = function jshint(grunt) {
// Load task
grunt.loadNpmTasks('grunt-contrib-jshint');
// Options
return {
files: [
'controllers/**/*.js',
'lib/**/*.js',
'models/**/*.js'
],
options: {
jshintrc: '.jshintrc'
}
};
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment