Skip to content

Instantly share code, notes, and snippets.

@vyuvalv
Created October 28, 2019 15:57
Show Gist options
  • Save vyuvalv/b393d32e5e80fad13bc5e517ae4ca6b8 to your computer and use it in GitHub Desktop.
Save vyuvalv/b393d32e5e80fad13bc5e517ae4ca6b8 to your computer and use it in GitHub Desktop.
Compose a workflow with multiple generators
# Main App
// will pass input parameters to the sub generator
this.composeWith(require.resolve('../org-commands/org-create'),{
devhubName : DevHub,
orgName : OrgName
});
# Sub Generator
module.exports = class extends Generator {
// Will recieve input parameters from parent generator
constructor(args, opts) {
super(args, opts);
this.argument("devhubName", { type: String, required: false });
this.argument("orgName", { type: String, required: false });
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment