Skip to content

Commit

Permalink
🍴 add task descriptions
Browse files Browse the repository at this point in the history
  • Loading branch information
mohayonao committed Jun 18, 2014
1 parent dd91990 commit ee98e95
Showing 1 changed file with 29 additions and 27 deletions.
56 changes: 29 additions & 27 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,57 +59,59 @@ module.exports = function(grunt) {
pkg: grunt.file.readJSON("./package.json")
});

grunt.loadTasks("tools/grunt-tasks");
if (process.argv.every(function(arg) {
return arg !== "--help";
})) {
grunt.loadTasks("tools/grunt-tasks");
}

grunt.registerTask("default", [ "-connect", "-watch" ]);
grunt.registerTask("default", "Start web server and run task whenever files changed.", [ "-connect", "-watch" ]);

grunt.registerTask("typo", function() {
grunt.registerTask("typo", "Run the typo checker.", function() {
grunt.task.run("-typo" + toTaskArgs(arguments));
});

grunt.registerTask("jshint", function() {
grunt.task.run("-jshint" + toTaskArgs(arguments));
grunt.registerTask("jscs", "Run the code style checker.", function() {
grunt.task.run("-jscs" + toTaskArgs(arguments));
});

grunt.registerTask("jscs", function() {
grunt.task.run("-jscs" + toTaskArgs(arguments));
grunt.registerTask("jshint", "Run the lint checker to detect errors and potential problems.", function() {
grunt.task.run("-jshint" + toTaskArgs(arguments));
});

grunt.registerTask("test", function() {
grunt.registerTask("test", "Run node unit tests.", function() {
grunt.task.run("-mocha" + toTaskArgs(arguments));
});

grunt.registerTask("mocha", function() {
grunt.registerTask("mocha", "Run node unit tests.", function() {
grunt.task.run("-mocha" + toTaskArgs(arguments));
});

grunt.registerTask("lint", function(filter) {
grunt.task.run("-typo:" + toS(filter));
grunt.task.run("-jscs:" + toS(filter));
grunt.task.run("-jshint:" + toS(filter));
grunt.registerTask("cover", "Run node unit tests and report code coverage.", function(filter) {
grunt.task.run("-mocha:" + toS(filter) + ":nyan:lcov");
});

grunt.registerTask("check", function(filter) {
grunt.task.run("-typo:" + toS(filter));
grunt.task.run("-jscs:" + toS(filter));
grunt.task.run("-jshint:" + toS(filter));
grunt.task.run("-mocha:" + toS(filter) + ":nyan:text");
grunt.task.run("-complexity:" + toS(filter));
grunt.registerTask("complexity", "Report code complexity.", function() {
grunt.task.run("-complexity" + toTaskArgs(arguments));
});

grunt.registerTask("cover", function(filter) {
grunt.task.run("-mocha:" + toS(filter) + ":nyan:lcov");
grunt.registerTask("complex", "Report code complexity.", function() {
grunt.task.run("-complexity" + toTaskArgs(arguments));
});

grunt.registerTask("complexity", function(f) {
grunt.task.run("-complexity" + toTaskArgs(arguments));
grunt.registerTask("lint", 'Alias for "typo", "jscs", "jshint" tasks.', function(filter) {
grunt.task.run("-typo:" + toS(filter));
grunt.task.run("-jscs:" + toS(filter));
grunt.task.run("-jshint:" + toS(filter));
});

grunt.registerTask("complex", function(f) {
grunt.task.run("-complexity" + toTaskArgs(arguments));
grunt.registerTask("check", 'Alias for "lint", "test", "complex" tasks.', function(filter) {
grunt.task.run("lint:" + toS(filter));
grunt.task.run("-mocha:" + toS(filter) + ":nyan:text");
grunt.task.run("-complexity:" + toS(filter));
});

grunt.registerTask("travis" , [ "-typo", "-jscs", "-jshint", "-mocha::list:lcovonly" ]);
grunt.registerTask("gh-pages", [ "build", "test::nyan:lcov", "plato" ]);
grunt.registerTask("travis" , "Run tasks for Travis CI.", [ "-typo", "-jscs", "-jshint", "-mocha::list:lcovonly" ]);
grunt.registerTask("gh-pages", "Generate contents for gh-pages.", [ "build", "test::nyan:lcov", "plato" ]);

};

0 comments on commit ee98e95

Please sign in to comment.