javascript - Grunt-init template execute shell command -


is there way execute shell command when creating grunt-init scaffolding template? example execute "bower install" , "git init" after project created without having enter commands afterwards. api not seem include functionality.

the template.js executed node, can use node has offer you.

i've managed child_process.exec:

var exec = require("child_process").exec; ... exec("bower install", function(error, stdout, stderr) {     if (error !== null) {         console.log("error: " + error);     }     done(); }); 

the "problem" see don't have logs bower, if installing many components, may take while before other visual feedback.


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

javascript - jQuery .height() return 0 when visible but non-0 when hidden -