mirror of
https://github.com/react-webpack-generators/generator-react-webpack.git
synced 2025-12-08 18:01:59 +00:00
fix appname bug
This commit is contained in:
parent
f7bb3c2b80
commit
27d8346e2a
@ -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
|
||||
});
|
||||
|
||||
@ -9,10 +9,10 @@ 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.appTemplate('App', 'components/' + scriptAppName);
|
||||
this.testTemplate('spec/App', 'components/' + scriptAppName);
|
||||
};
|
||||
|
||||
MainGenerator.prototype.createMainFile = function createMainFile() {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user