next-app-boilerplate/plopfile.js
Walid 8d066ed42f
refactor: config with scss to tailwind (#42)
* fix: update deps and devDeps
* refactor(prettier): remove unwritten file names from formatter
* styles: remove stylelint & scss
* refactor: replace scss styles to tailwind
* feat: implement tailwind config
* refactor: update eslint config
* refactor(locales): replace autho's github url with repo itself
* refactor: change author's name license
* refactor(code): update code settings
* refactor: improve file components generators
* fix(code): add sharable config
* fix(linter): resolve bad parserConfig and linting itself
* refactor: bad imports
* refactor: update workflow with its scripts
2022-08-13 14:12:53 +01:00

32 lines
766 B
JavaScript

module.exports = (
/** @type {import('plop').NodePlopAPI} */
plop
) =>
plop.setGenerator('component', {
description: 'Generate a component',
prompts: [
{
type: 'input',
name: 'name',
message: "What's the component's name ?"
},
{
type: 'input',
name: 'folder',
message: "What's the folder's name ?"
}
],
actions: [
{
type: 'add',
path: 'components/{{folder}}/{{properCase name}}/{{properCase name}}.tsx',
templateFile: 'generators/Component/Component.tsx.hbs'
},
{
type: 'add',
path: 'components/{{folder}}/{{properCase name}}/index.ts',
templateFile: 'generators/Component/index.ts.hbs'
}
]
})