Skip to content

Instantly share code, notes, and snippets.

@divyanshu013
Last active March 18, 2019 07:28
Show Gist options
  • Save divyanshu013/7d230bcaf99ae60f47eda3ca6870b075 to your computer and use it in GitHub Desktop.
Save divyanshu013/7d230bcaf99ae60f47eda3ca6870b075 to your computer and use it in GitHub Desktop.
Generator - Basic
const Generator = require('yeoman-generator');
module.exports = class extends Generator {
constructor(args, options) {
super(args, options);
}
// first stage
async prompting() {
this.log('Generator starting... 🤖');
}
// second stage
writing() {
this.log('Writing files... 📝');
}
// last stage
end() {
this.log('Bye... 👋');
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment