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

Commit

Permalink
Fixes bower install on app generator, fixes #298
Browse files Browse the repository at this point in the history
  • Loading branch information
ruyadorno committed Jan 25, 2016
1 parent 286a078 commit 2daabdc
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 2daabdc

Please sign in to comment.