On Github benjdlambert / presentation-grunt
$ npm init
$ npm install grunt --save
$ npm install -g grunt-cli
grunt taskname
grunt taskname:target
grunt taskname:arg1:arg2
grunt.registerTask(taskName, [taskList]);
grunt.registerTask('build', ['phpunit', 'phpcs', 'build-assets']);
grunt.registerTask(taskName, description, taskFunction)
grunt.registerTask('build', 'do some building!', function() { console.log('ive just been run'); });
grunt.registerMultiTask(taskName, [description, ] taskFunction)
grunt.initConfig({ log: { foo: [1, 2, 3], bar: 'hello world', baz: false } }); grunt.registerMultiTask('log', 'Log stuff.', function() { grunt.log.writeln(this.target + ': ' + this.data); });
$ npm install grunt-contrib-uglify --save
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt {taskname}