Skip to content

Instantly share code, notes, and snippets.

@vyuvalv
Last active November 3, 2019 10:45
Show Gist options
  • Save vyuvalv/2b8ea288fd5d343718bb4b04deca982c to your computer and use it in GitHub Desktop.
Save vyuvalv/2b8ea288fd5d343718bb4b04deca982c to your computer and use it in GitHub Desktop.
Writing Files using Yeoman Template
// this.props holds the answers values
writing() {
// Setting Features Selected
let features = this.props.orgFeatures.join("\",\"");
// Copy and populate scratch org defitnition file from a template
this.fs.copyTpl(
this.templatePath('config/scratch-org-def.json'),
this.destinationPath( this.props.projectName + '/config/scratch-org-def.json'),
{ orgName: orgAlias,
orgFeatures: features,
adminEmail: this.props.adminEmail,
orgEdition: this.props.orgEdition,
hasSampleData: this.props.hasSampleData,
orgDescription: this.props.orgDescription,
orgLocal: this.props.orgLocal,
orgLanguage: this.props.orgLanguage
}
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment