Skip to content

Instantly share code, notes, and snippets.

@fnobi
Created August 23, 2013 09:46
Show Gist options
  • Save fnobi/6317493 to your computer and use it in GitHub Desktop.
Save fnobi/6317493 to your computer and use it in GitHub Desktop.
grunt-initと同時に、npm install & bower installもやっちゃう ref: http://qiita.com/fnobi/items/68074616035f20cd23e4
var shellLines = require('./lib/shellLines');
exports.template = function (grunt, init, done) {
init.process( {}, [
init.prompt('name'),
init.prompt('description')
], function(err, props) {
// write package.json
init.writePackageJSON('package.json', pkg);
// write bower.json
init.writePackageJSON('bower.json', bower);
// npm install & bower install
shellLines([{
command: 'npm install',
message: 'Installing npm dependencies'
},{
command: 'bower install',
message: 'Installing bower dependencies'
}], done);
});
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment