From a4d5cf4b74326b60637d773590d72e9f02b32aff Mon Sep 17 00:00:00 2001 From: Revath S Kumar Date: Wed, 2 Apr 2014 10:25:44 +0530 Subject: [PATCH] Fixes #233: use --appPath and name in backbone:all --- all/index.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/all/index.js b/all/index.js index e524f80..68f58f3 100644 --- a/all/index.js +++ b/all/index.js @@ -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; @@ -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');