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

Commit

Permalink
Trigger mocha generator if namespace is backbone
Browse files Browse the repository at this point in the history
or backbone:all
  • Loading branch information
revathskumar committed May 15, 2014
1 parent 187e32b commit 1840da1
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 @@ -19,7 +19,7 @@ var BackboneGenerator = yeoman.generators.Base.extend({
this.testFramework = this.options['test-framework'] || 'mocha';
this.templateFramework = this.options['template-framework'] || 'lodash';

if (this.options.namespace === 'backbone:app') {
if (['backbone:app', 'backbone'].indexOf(this.options.namespace) >= 0) {
this.hookFor(this.testFramework, {
as: 'app',
options: {
Expand All @@ -42,7 +42,7 @@ var BackboneGenerator = yeoman.generators.Base.extend({
this.indexFile = this.readFileAsString(path.join(this.sourceRoot(), 'index.html'));

this.on('end', function () {
if (this.options.namespace === 'backbone:app') {
if (['backbone:app', 'backbone'].indexOf(this.options.namespace) >= 0) {
if (/^.*test$/.test(process.cwd())) {
process.chdir('..');
}
Expand Down

0 comments on commit 1840da1

Please sign in to comment.