From 716ecc1b86021cbe54145d5a370cb28c2b4e7b71 Mon Sep 17 00:00:00 2001 From: JC Brand Date: Mon, 29 Jul 2013 23:13:31 +0200 Subject: [PATCH] Add the 'build' grunt task - it calls 'bower update' and then 'make normal' inside the strophe dir. --- Gruntfile.js | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/Gruntfile.js b/Gruntfile.js index 277307041..229f396aa 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -32,7 +32,23 @@ module.exports = function(grunt) { 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'); }); };