Created
October 1, 2014 04:35
-
-
Save jakepruitt/95880d999485c8fca972 to your computer and use it in GitHub Desktop.
Splitting grunt tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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' ]); | |
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| '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