🎉 chore(init): project initialization

This commit is contained in:
web@ppanel
2024-11-14 01:22:43 +07:00
commit 829edfa824
479 changed files with 61413 additions and 0 deletions
+30
View File
@@ -0,0 +1,30 @@
import type { PlopTypes } from '@turbo/gen';
// Learn more about Turborepo Generators at https://turbo.build/repo/docs/core-concepts/monorepos/code-generation
export default function generator(plop: PlopTypes.NodePlopAPI): void {
// A simple generator to add a new React component to the internal UI library
plop.setGenerator('react-component', {
description: 'Adds a new react component',
prompts: [
{
type: 'input',
name: 'name',
message: 'What is the name of the component?',
},
],
actions: [
{
type: 'add',
path: 'src/{{kebabCase name}}.tsx',
templateFile: 'templates/component.hbs',
},
{
type: 'append',
path: 'package.json',
pattern: /"exports": {(?<insertion>)/g,
template: ' "./{{kebabCase name}}": "./src/{{kebabCase name}}.tsx",',
},
],
});
}
@@ -0,0 +1,8 @@
export const
{{pascalCase name}}
= ({ children }: { children: React.ReactNode }) => { return (
<div>
<h1>{{pascalCase name}} Component</h1>
{children}
</div>
); };