This repository has been archived on 2024-10-29. You can view files and clone it, but cannot push or open issues or pull requests.
website/generators/component/index.js

33 lines
752 B
JavaScript
Raw Permalink Normal View History

2021-10-24 05:48:06 +02:00
/**
* @returns {import('node-plop').PlopGeneratorConfig}
*/
exports.componentGenerator = () => {
return {
description: "Component Generator",
2021-10-24 05:48:06 +02:00
prompts: [
{
type: "input",
name: "name",
message: "component name",
2021-10-24 05:48:06 +02:00
},
{
type: "input",
name: "folder",
message: "folder in components",
},
2021-10-24 05:48:06 +02:00
],
actions: [
{
type: "add",
path: "components/{{folder}}/{{properCase name}}/{{properCase name}}.tsx",
templateFile: "generators/component/Component.tsx.hbs",
2021-10-24 05:48:06 +02:00
},
{
type: "add",
path: "components/{{folder}}/{{properCase name}}/index.ts",
templateFile: "generators/component/index.ts.hbs",
},
],
2021-10-24 05:48:06 +02:00
}
}