On Github smithclay / nodejs-talk-build-tools
*graphic from a great @paulirish talk about tools.
using ant...
desc('This is the default task.'); task('default', function (params) { console.log('This is the default task.'); });There's also a CoffeeScript version called cake.
grunt.initConfig({ min: { dist: { src: ['src/source1.js', 'src/source2.js'], dest: 'dist/built.min.js' } } });
Lots of common tasks and plugins that you can configure in a JSON object, but you also can script with the full power of node.js.
// Load some grunt tasks we’ve developed from the npm package grunt-barkeep. grunt.loadNpmTasks('grunt-barkeep'); // Load grunt-shell grunt.loadNpmTasks('grunt-shell'); // Load grunt-jasmine grunt.loadNpmTasks('grunt-jasmine');
It's easy to create your own plugins.
Check out gruntjs.com
var js = grunt.file.expandFiles(task.file.src); // Hey, async is available in grunt.utils. grunt.utils.async.forEach(js, function (fn, callback) { // ... if (err) { // Fatal error logging grunt.fail.fatal(err); } });
rm -rf *.js