const testName = require('./plop/helpers/testName.js') module.exports = plop => { plop.setGenerator('component', { description: 'Creates a component.', prompts: [ { name: 'name', message: 'Enter the component name.', validate: name => { if (name.trim().length < 1) { return 'Name is required.' } return true }, }, { name: 'description', message: 'Describe your component.', }, ], actions: [ { type: 'addMany', templateFiles: 'plop/templates/component/*', base: 'plop/templates/component', destination: 'packages/react-common/components/{{pascalCase name}}', }, ], }) }