Add the 'build' grunt task

- it calls 'bower update' and then 'make normal' inside the strophe dir.
This commit is contained in:
JC Brand 2013-07-29 23:13:31 +02:00
parent 868ae82bb0
commit 716ecc1b86

View File

@ -32,7 +32,23 @@ module.exports = function(grunt) {
done(); done();
}); });
}); });
grunt.registerTask('default', 'Perform all checks (e.g. before releasing)', function () {
grunt.registerTask('build', 'Set up the development environment', function () {
var done = this.async();
var child_process = require('child_process');
var exec = child_process.exec;
exec('bower update && cd ./components/strophe && make normal',
function (err, stdout, stderr) {
if (err) {
grunt.log.write('build failed with error code '+err.code);
grunt.log.write(stderr);
}
grunt.log.write(stdout);
done();
});
});
grunt.registerTask('check', 'Perform all checks (e.g. before releasing)', function () {
grunt.task.run('jshint', 'test'); grunt.task.run('jshint', 'test');
}); });
}; };