-
-
Save jgable/5616414 to your computer and use it in GitHub Desktop.
This file contains 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) { | |
grunt.registerMultiTask("filecount", "Count how many files were passed to the task", function() { | |
var fileCount = this.filesSrc.length; | |
if(grunt.option("verbose")) { | |
this.filesSrc.each(function(filePath) { | |
grunt.verbose.writeln(filePath); | |
}); | |
} | |
grunt.log(">> " + fileCount + " files."); | |
}); | |
}; |
This file contains 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) { | |
var cfg = { | |
jshint2: { | |
options: { | |
jshint: { | |
node: true, | |
unused: true, | |
undef: true | |
} | |
}, | |
all: ["lib/**/*.js"] | |
} | |
}; | |
grunt.initConfig(cfg); | |
// Assumes you have: npm install grunt-jshint2 --save-dev | |
grunt.loadNpmTasks("grunt-jshint2"); | |
grunt.registerTask("default", ["jshint2:all"]); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment