-
-
Notifications
You must be signed in to change notification settings - Fork 4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #14364 from mshima/skip_ci_blueprint_options
Fix loading of blueprint options.
- Loading branch information
Showing
4 changed files
with
74 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
const createGenerator = env => class extends env.requireGenerator('jhipster:app') { | ||
constructor(args, opts) { | ||
super(args, { fromBlueprint: true, ...opts }); // fromBlueprint variable is important | ||
|
||
this.option('foo-bar', { | ||
desc: 'Sample option', | ||
type: Boolean, | ||
}); | ||
|
||
if (this.options.help) { | ||
return; | ||
} | ||
|
||
const jhContext = (this.jhipsterContext = this.options.jhipsterContext); | ||
if (!jhContext) { | ||
this.error("This is a JHipster blueprint and should be used only like 'jhipster --blueprints myblueprint')}"); | ||
} | ||
} | ||
|
||
get initializing() { | ||
return super._initializing(); | ||
} | ||
|
||
get prompting() { | ||
return super._prompting(); | ||
} | ||
|
||
get configuring() { | ||
return super._configuring(); | ||
} | ||
|
||
get default() { | ||
return super._default(); | ||
} | ||
|
||
get writing() { | ||
return super._writing(); | ||
} | ||
|
||
get install() { | ||
return super._install(); | ||
} | ||
|
||
get end() { | ||
return super._end(); | ||
} | ||
}; | ||
|
||
module.exports = { createGenerator }; |