mirror of
https://github.com/wassname/generator-react-webpack.git
synced 2026-09-09 11:22:44 +08:00
Switch the generation of everything so we generate tests and they can actually pass.
This commit is contained in:
+2
-10
@@ -88,16 +88,8 @@ Generator.prototype.htmlTemplate = function (src, dest) {
|
||||
]);
|
||||
};
|
||||
|
||||
Generator.prototype.generateSourceAndTest = function (appTemplate, testTemplate, stylesTemplate, targetDirectory) {
|
||||
Generator.prototype.generateSourceAndTest = function (appTemplate, testTemplate, stylesTemplate, targetDirectory, includeStyles) {
|
||||
this.appTemplate(appTemplate, path.join(targetDirectory, this._.capitalizeFile(this.name)));
|
||||
this.testTemplate(testTemplate, path.join(targetDirectory, this._.capitalizeFile(this.name)));
|
||||
this.stylesTemplate(stylesTemplate, path.join(this._.capitalizeFile(this.name)));
|
||||
if(includeStyles) this.stylesTemplate(stylesTemplate, path.join(this._.capitalizeFile(this.name)));
|
||||
};
|
||||
|
||||
Generator.prototype.generateAction = function() {
|
||||
this.appTemplate('Action', path.join('actions', this._.capitalizeFile(this.name) + 'ActionCreators'));
|
||||
}
|
||||
|
||||
Generator.prototype.generateStore = function() {
|
||||
this.appTemplate('Store', path.join('stores', this._.capitalizeFile(this.name) + 'Store'));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user