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

Commit

Permalink
Use options.namespace instead of this.generatorName
Browse files Browse the repository at this point in the history
  • Loading branch information
revathskumar committed Apr 19, 2014
1 parent 2f6e164 commit fa5ef47
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand All @@ -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('..');
}
Expand Down

0 comments on commit fa5ef47

Please sign in to comment.