From 2daabdc4e7f1e3b028006324e4994932a92d54e6 Mon Sep 17 00:00:00 2001 From: Ruy Adorno Date: Sun, 24 Jan 2016 22:31:15 -0500 Subject: [PATCH] Fixes bower install on app generator, fixes #298 --- generators/app/index.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/generators/app/index.js b/generators/app/index.js index 500a33c..c713ebe 100644 --- a/generators/app/index.js +++ b/generators/app/index.js @@ -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') + }); } } });