Skip to content

Commit

Permalink
Improve e2e and app subGen
Browse files Browse the repository at this point in the history
  • Loading branch information
avdev4j committed Aug 7, 2020
1 parent 4588134 commit c97c265
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
1 change: 0 additions & 1 deletion generators/app/index.js
Expand Up @@ -371,7 +371,6 @@ module.exports = class extends BaseBlueprintGenerator {
this.configOptions.skipComposeE2E = true;
this.composeWith(require.resolve('../e2e'), {
...options,
'client-hook': !this.skipClient,
configOptions,
debug: this.isDebugEnabled,
});
Expand Down
9 changes: 4 additions & 5 deletions generators/e2e/index.js
Expand Up @@ -35,9 +35,6 @@ module.exports = class extends BaseBlueprintGenerator {
defaults: false,
});

this.setupServerOptions(this);
this.setupClientOptions(this);

useBlueprints = !this.fromBlueprint && this.instantiateBlueprints('e2e', { 'client-hook': !this.skipClient });
}

Expand All @@ -48,13 +45,12 @@ module.exports = class extends BaseBlueprintGenerator {
this.checkInvocationFromCLI();
},

setupConsts() {
setupConstants() {
// Make constants available in templates
this.MAIN_DIR = constants.MAIN_DIR;
this.TEST_DIR = constants.TEST_DIR;
this.SERVER_MAIN_RES_DIR = constants.SERVER_MAIN_RES_DIR;
this.ANGULAR = constants.SUPPORTED_CLIENT_FRAMEWORKS.ANGULAR;
this.BUILD_DIR = this.getBuildDirectoryForBuildTool(this.buildTool);
this.CLIENT_DIST_DIR = this.getResourceBuildDirectoryForBuildTool(this.configOptions.buildTool) + constants.CLIENT_DIST_DIR;
},
};
Expand All @@ -68,6 +64,9 @@ module.exports = class extends BaseBlueprintGenerator {
// Public API method used by the getter and also by Blueprints
_default() {
return {
setupConstants() {
this.BUILD_DIR = this.getBuildDirectoryForBuildTool(this.buildTool);
},
loadSharedConfig() {
this.loadAppConfig();
this.loadClientConfig();
Expand Down

0 comments on commit c97c265

Please sign in to comment.