// The name `constructor` is important here constructor(args, opts) { // Calling the super constructor is important so our generator is correctly set up super(args, opts) this.argument('componentName', { type: String, required: false }) if (this.options.componentName) { this.componentName = _.upperFirst(_.camelCase(this.options.componentName)) } }
prompting() { const prompts = [] if (!this.options.componentName) { prompts.push({ type: 'input', if (answers.componentName) { this.componentName = _.upperFirst(_.camelCase(answers.componentName))