fix appname

This commit is contained in:
Yonatan Schreiber 2015-04-04 16:07:08 +03:00
parent f7bb3c2b80
commit 9c9ecaa016
2 changed files with 6 additions and 4 deletions

View File

@ -15,7 +15,6 @@ var ReactWebpackGenerator = module.exports = function ReactWebpackGenerator(args
this.config.set('app-name', this.appname);
args = ['main'];
if (typeof this.options.appPath === 'undefined') {
this.options.appPath = this.options.appPath || 'src';
@ -23,6 +22,8 @@ var ReactWebpackGenerator = module.exports = function ReactWebpackGenerator(args
this.appPath = this.options.appPath;
args = [this.scriptAppName];
this.composeWith('react-webpack:common', {
args: args
});

View File

@ -9,10 +9,11 @@ var MainGenerator = module.exports = function MainGenerator(args, options, confi
util.inherits(MainGenerator, ScriptBase);
MainGenerator.prototype.createAppFile = function createAppFile() {
MainGenerator.prototype.createAppFile = function createAppFile(scriptAppName) {
this.reactRouter = this.env.options.reactRouter;
this.appTemplate('App', 'components/' + this.scriptAppName);
this.testTemplate('spec/App', 'components/' + this.scriptAppName);
this.scriptAppName = scriptAppName;
this.appTemplate('App', 'components/' + scriptAppName);
this.testTemplate('spec/App', 'components/' + scriptAppName);
};
MainGenerator.prototype.createMainFile = function createMainFile() {