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

Commit

Permalink
added appname to .yo-rc.json to generate classes with proper names
Browse files Browse the repository at this point in the history
  • Loading branch information
gilbarbara authored and revathskumar committed Feb 26, 2014
1 parent 2f6fd72 commit 02758c5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand All @@ -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,
Expand Down
2 changes: 2 additions & 0 deletions script-base.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 02758c5

Please sign in to comment.