Skip to content

Commit

Permalink
[UPDATE] Removing headless and implementing Chakra, also added plop t…
Browse files Browse the repository at this point in the history
…o generate some boilerplate.
  • Loading branch information
ThunderNaka committed Aug 12, 2024
1 parent 20dee00 commit 0a251ff
Show file tree
Hide file tree
Showing 62 changed files with 10,456 additions and 5,838 deletions.
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*.handlebars
*.hbs
5 changes: 4 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,8 @@
"editor.formatOnPaste": true,
"editor.formatOnSave": true,
"editor.formatOnSaveMode": "file",
"files.autoSave": "onFocusChange"
"files.autoSave": "onFocusChange",
"tailwindCSS.experimental.classRegex": [
["tv\\(([^)]*)\\)", "[\"'`]([^\"'`]*).*?[\"'`]"]
]
}
1 change: 0 additions & 1 deletion cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
"exportallmodule",
"favorited",
"formkit",
"headlessui",
"healthie",
"heroicons",
"hookform",
Expand Down
9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,9 @@
"prepare": "husky || true"
},
"dependencies": {
"@headlessui/react": "^2.0.4",
"@headlessui/tailwindcss": "^0.2.0",
"@heroicons/react": "^2.1.3",
"@hookform/resolvers": "^3.4.2",
"@radix-ui/react-dialog": "^1.1.1",
"@radix-ui/react-slot": "^1.1.0",
"@sentry/react": "^8.4.0",
"@sentry/vite-plugin": "^2.17.0",
"@tanstack/react-query": "^5.39.0",
Expand All @@ -43,6 +42,7 @@
"react-hook-form": "^7.51.5",
"react-router-dom": "^6.23.1",
"tailwind-merge": "^2.3.0",
"tailwind-variants": "^0.2.1",
"tailwindcss": "3.4.3",
"tailwindcss-animate": "^1.0.7",
"uuid": "^9.0.1",
Expand Down Expand Up @@ -92,6 +92,7 @@
"eslint-plugin-storybook": "^0.8.0",
"husky": "^9.0.11",
"lint-staged": "^15.2.2",
"plop": "^4.0.1",
"postcss": "^8.4.35",
"prettier": "^3.2.5",
"prettier-plugin-tailwindcss": "^0.5.12",
Expand All @@ -116,4 +117,4 @@
"eslint --fix"
]
}
}
}
70 changes: 70 additions & 0 deletions plopfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
export default function (
/** @type {import('plop').NodePlopAPI} */
plop,
) {
// Generator for creating a domain with subfolders
plop.setGenerator("domain", {
description: "Create a new domain",
prompts: [
{
type: "input",
name: "name",
message: "Domain name (e.g., users):",
},
],
actions: [
{
type: "add",
path: "src/domains/{{kebabCase name}}/components/index.ts",
templateFile: "templates/domains/components/index.ts.hbs",
},
// Components
{
type: "add",
path: "src/domains/{{kebabCase name}}/components/ExampleComponent/ExampleComponent.tsx",
templateFile: "templates/domains/components/component-example.tsx.hbs",
},
{
type: "add",
path: "src/domains/{{kebabCase name}}/components/ExampleComponent/index.ts",
templateFile: "templates/domains/components/index.ts.hbs",
},
{
type: "add",
path: "src/domains/{{kebabCase name}}/components/index.ts",
templateFile: "templates/domains/components/index.ts.hbs",
},
// Context
{
type: "add",
path: "src/domains/{{kebabCase name}}/context/index.ts",
templateFile: "templates/domains/index.ts.hbs",
},
{
type: "add",
path: "src/domains/{{kebabCase name}}/sections/index.ts",
templateFile: "templates/domains/index.ts.hbs",
},
{
type: "add",
path: "src/domains/{{kebabCase name}}/queries/index.ts",
templateFile: "templates/domains/index.ts.hbs",
},
{
type: "add",
path: "src/domains/{{kebabCase name}}/screens/index.ts",
templateFile: "templates/domains/index.ts.hbs",
},
{
type: "add",
path: "src/domains/{{kebabCase name}}/api/index.ts",
templateFile: "templates/domains/index.ts.hbs",
},
{
type: "add",
path: "src/domains/{{kebabCase name}}/index.ts",
templateFile: "templates/domains/index.ts.hbs",
},
],
});
}
Loading

0 comments on commit 0a251ff

Please sign in to comment.