next-app-boilerplate/plopfile.js

28 lines
657 B
JavaScript
Raw Normal View History

2022-04-11 18:28:07 +02:00
module.exports = (
/** @type {import('plop').NodePlopAPI} */
plop
) => {
plop.setGenerator('component', {
description: 'Generate a component',
prompts: [
{
type: 'input',
name: 'name',
message: 'Component name'
}
],
actions: [
{
type: 'add',
path: 'components/{{properCase name}}/{{properCase name}}.tsx',
templateFile: 'templates/Component/Component.tsx.hbs'
},
{
type: 'add',
path: 'components/{{properCase name}}/{{properCase name}}.module.scss',
templateFile: 'templates/Component/component.module.scss.hbs'
}
]
})
}