Skip to content

Instantly share code, notes, and snippets.

@aztack
Created October 16, 2023 06:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aztack/4ddcfb9b400e94eac7dbe7f243f85b96 to your computer and use it in GitHub Desktop.
Save aztack/4ddcfb9b400e94eac7dbe7f243f85b96 to your computer and use it in GitHub Desktop.
Yeoman Generator Overwrite without Prompt
class extends Generator {
writing() {
// enable force overwrite
this.conflicter.force = true;
this.fs.copyTpl(
this.templatePath('_package.json'),
this.destinationPath('package.json'),
{ appname: 'your_appname' }
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment