From fa5ef471aac528583202281af133636ed992fcbf Mon Sep 17 00:00:00 2001 From: Revath S Kumar Date: Sat, 19 Apr 2014 23:47:54 +0530 Subject: [PATCH] Use options.namespace instead of this.generatorName --- app/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/index.js b/app/index.js index 3365342..cbbbeb5 100644 --- a/app/index.js +++ b/app/index.js @@ -18,7 +18,7 @@ var Generator = module.exports = function Generator(args, options, config) { this.testFramework = this.options['test-framework'] || 'mocha'; this.templateFramework = this.options['template-framework'] || 'lodash'; - if (['app', 'backbone'].indexOf(this.generatorName) >= 0) { + if (this.options.namespace === 'backbone:app') { this.hookFor(this.testFramework, { as: 'app', options: { @@ -41,7 +41,7 @@ var Generator = module.exports = function Generator(args, options, config) { this.indexFile = this.readFileAsString(path.join(this.sourceRoot(), 'index.html')); this.on('end', function () { - if (['app', 'backbone'].indexOf(this.generatorName) >= 0) { + if (this.options.namespace === 'backbone:app') { if (/^.*test$/.test(process.cwd())) { process.chdir('..'); }