diff --git a/app/index.js b/app/index.js index 8aacb6b..b51461c 100644 --- a/app/index.js +++ b/app/index.js @@ -4,7 +4,6 @@ var path = require('path'); var yeoman = require('yeoman-generator'); var scriptBase = require('../script-base'); - var Generator = module.exports = function Generator(args, options, config) { yeoman.generators.Base.apply(this, arguments); @@ -28,6 +27,7 @@ var Generator = module.exports = function Generator(args, options, config) { } this.config.defaults({ + appName: this.appname, ui: this.options.ui, coffee: this.options.coffee, testFramework: this.testFramework, diff --git a/script-base.js b/script-base.js index e008123..19b5ff3 100644 --- a/script-base.js +++ b/script-base.js @@ -7,6 +7,8 @@ var backboneUtils = require('./util.js'); var Generator = module.exports = function Generator() { yeoman.generators.NamedBase.apply(this, arguments); + this.appname = this.config.get('appName') || path.basename(process.cwd()); + this.env.options.appPath = this.config.get('appPath') || 'app'; if (this.env.options.minsafe) {