Skip to content

Commit

Permalink
Fixes yeoman#233: use --appPath and name in backbone:all
Browse files Browse the repository at this point in the history
  • Loading branch information
revathskumar committed Apr 2, 2014
1 parent 68567a8 commit a4d5cf4
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion all/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
var path = require('path');
var util = require('util');
var yeoman = require('yeoman-generator');
var backboneUtils = require('../util.js');

module.exports = Generator;

Expand All @@ -13,7 +14,11 @@ function Generator(args, options, config) {
this.env.options.appPath = this.options.appPath || 'app';
this.config.set('appPath', this.env.options.appPath);

args = ['application'];
this.argument('appname', { type: String, required: false });
this.appname = this.appname || path.basename(process.cwd());
this.appname = backboneUtils.classify(this.appname);

args = [this.appname];

if (this.options.coffee) {
args.push('--coffee');
Expand Down

0 comments on commit a4d5cf4

Please sign in to comment.