Skip to content
This repository has been archived by the owner on Mar 26, 2018. It is now read-only.

Commit

Permalink
Merge pull request #383 from ruyadorno/fix-bower-install
Browse files Browse the repository at this point in the history
Fixes bower install on app generator
  • Loading branch information
ruyadorno committed Jan 30, 2016
2 parents 8e426e5 + 2daabdc commit 36d7dc9
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions generators/app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -396,8 +396,14 @@ var BackboneGenerator = yeoman.generators.Base.extend({
},

install: function () {
if (['backbone:app', 'backbone'].indexOf(this.options.namespace) >= 0) {
this.installDependencies({ skipInstall: this.options['skip-install'] });
var shouldInstall = !this.options['skip-install'];
var isInstallable = ['backbone:app', 'backbone'].indexOf(this.options.namespace) > -1;
if (shouldInstall && isInstallable) {
this.npmInstall();
this.bowerInstall('', {
'config.cwd': this.destinationPath('.'),
'config.directory': path.join(this.config.get('appPath'), 'bower_components')
});
}
}
});
Expand Down

0 comments on commit 36d7dc9

Please sign in to comment.