Skip to content

Commit

Permalink
Fix running bower install and npm install on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
kevva committed Apr 10, 2013
1 parent b112b89 commit 98390bb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ var util = require('util');
var path = require('path');
var spawn = require('child_process').spawn;
var yeoman = require('yeoman-generator');
var win32 = process.platform === 'win32';


var AppGenerator = module.exports = function Appgenerator(args, options, config) {
Expand All @@ -28,8 +29,8 @@ var AppGenerator = module.exports = function Appgenerator(args, options, config)
console.log('\n\nI\'m all done. Just run ' + 'npm install & bower install --dev'.bold.yellow + ' to install the required dependencies.\n\n');
} else {
console.log('\n\nI\'m all done. Running ' + 'npm install & bower install'.bold.yellow + ' for you to install the required dependencies. If this fails, try running the command yourself.\n\n');
spawn('npm', ['install'], { stdio: 'inherit' });
spawn('bower', ['install'], { stdio: 'inherit' });
spawn(win32 ? 'cmd' : 'npm', [win32 ? '/c npm install' : 'install'], { stdio: 'inherit' });
spawn(win32 ? 'cmd' : 'bower', [win32 ? '/c bower install' : 'install'], { stdio: 'inherit' });
}
});

Expand Down

0 comments on commit 98390bb

Please sign in to comment.