@pavlos-samaras/react-cli 2.0.2 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (90) hide show
  1. package/dist/commands/generate/utils/generateComponent.d.ts.map +1 -1
  2. package/dist/commands/generate/utils/generateComponent.js +7 -6
  3. package/dist/commands/generate/utils/generateComponent.js.map +1 -1
  4. package/dist/commands/generate/utils/generateHook.d.ts.map +1 -1
  5. package/dist/commands/generate/utils/generateHook.js +3 -2
  6. package/dist/commands/generate/utils/generateHook.js.map +1 -1
  7. package/dist/commands/generate/utils/runGenerateComponent.js +1 -1
  8. package/dist/commands/generate/utils/runGenerateComponent.js.map +1 -1
  9. package/dist/commands/generate/utils/runGenerateHook.js +1 -1
  10. package/dist/commands/generate/utils/runGenerateHook.js.map +1 -1
  11. package/dist/commands/new/new.constants.d.ts +2 -0
  12. package/dist/commands/new/new.constants.d.ts.map +1 -1
  13. package/dist/commands/new/new.constants.js +2 -0
  14. package/dist/commands/new/new.constants.js.map +1 -1
  15. package/dist/commands/new/new.d.ts.map +1 -1
  16. package/dist/commands/new/new.js +16 -27
  17. package/dist/commands/new/new.js.map +1 -1
  18. package/dist/commands/new/new.types.d.ts +7 -0
  19. package/dist/commands/new/new.types.d.ts.map +1 -0
  20. package/dist/commands/new/new.types.js +2 -0
  21. package/dist/commands/new/new.types.js.map +1 -0
  22. package/dist/commands/new/utils/general.d.ts +3 -0
  23. package/dist/commands/new/utils/general.d.ts.map +1 -0
  24. package/dist/commands/new/utils/general.js +6 -0
  25. package/dist/commands/new/utils/general.js.map +1 -0
  26. package/dist/commands/new/utils/runCommand.d.ts +2 -0
  27. package/dist/commands/new/utils/runCommand.d.ts.map +1 -0
  28. package/dist/commands/new/utils/runCommand.js +7 -0
  29. package/dist/commands/new/utils/runCommand.js.map +1 -0
  30. package/dist/commands/new/utils/runCreateVite.d.ts +2 -0
  31. package/dist/commands/new/utils/runCreateVite.d.ts.map +1 -0
  32. package/dist/commands/new/utils/runCreateVite.js +32 -0
  33. package/dist/commands/new/utils/runCreateVite.js.map +1 -0
  34. package/dist/commands/new/utils/runCustomTemplate.d.ts +3 -0
  35. package/dist/commands/new/utils/runCustomTemplate.d.ts.map +1 -0
  36. package/dist/commands/new/utils/runCustomTemplate.js +25 -0
  37. package/dist/commands/new/utils/runCustomTemplate.js.map +1 -0
  38. package/dist/utils/general.d.ts +4 -0
  39. package/dist/utils/general.d.ts.map +1 -0
  40. package/dist/utils/general.js +3 -0
  41. package/dist/utils/general.js.map +1 -0
  42. package/package.json +3 -2
  43. package/templates/component.tpl +9 -0
  44. package/templates/hook.tpl +3 -0
  45. package/templates/react/README.md +12 -0
  46. package/templates/react/eslint.config.js +29 -0
  47. package/templates/react/index.html +13 -0
  48. package/templates/react/jsconfig.json +13 -0
  49. package/templates/react/package.json +30 -0
  50. package/templates/react/public/favicon.svg +1 -0
  51. package/templates/react/src/app/App.jsx +12 -0
  52. package/templates/react/src/app/providers.jsx +13 -0
  53. package/templates/react/src/app/routes.jsx +19 -0
  54. package/templates/react/src/config/queryClient.config.js +12 -0
  55. package/templates/react/src/lib/queryClient.jsx +6 -0
  56. package/templates/react/src/main.jsx +13 -0
  57. package/templates/react/src/pages/home/Home.jsx +11 -0
  58. package/templates/react/src/pages/home/Home.module.scss +0 -0
  59. package/templates/react/vite.config.js +18 -0
  60. package/templates/react-ts/README.md +75 -0
  61. package/templates/react-ts/eslint.config.js +22 -0
  62. package/templates/react-ts/index.html +13 -0
  63. package/templates/react-ts/package-lock.json +3221 -0
  64. package/templates/react-ts/package.json +33 -0
  65. package/templates/react-ts/public/favicon.svg +1 -0
  66. package/templates/react-ts/src/app/App.tsx +12 -0
  67. package/templates/react-ts/src/app/providers.tsx +16 -0
  68. package/templates/react-ts/src/app/routes.tsx +19 -0
  69. package/templates/react-ts/src/config/queryClient.config.ts +14 -0
  70. package/templates/react-ts/src/lib/queryClient.tsx +6 -0
  71. package/templates/react-ts/src/main.tsx +13 -0
  72. package/templates/react-ts/src/pages/home/Home.module.scss +0 -0
  73. package/templates/react-ts/src/pages/home/Home.tsx +11 -0
  74. package/templates/react-ts/tsconfig.app.json +29 -0
  75. package/templates/react-ts/tsconfig.json +7 -0
  76. package/templates/react-ts/tsconfig.node.json +23 -0
  77. package/templates/react-ts/vite.config.ts +18 -0
  78. package/templates/stylesheet.tpl +3 -0
  79. package/dist/templates/component.d.ts +0 -3
  80. package/dist/templates/component.d.ts.map +0 -1
  81. package/dist/templates/component.js +0 -11
  82. package/dist/templates/component.js.map +0 -1
  83. package/dist/templates/hook.d.ts +0 -3
  84. package/dist/templates/hook.d.ts.map +0 -1
  85. package/dist/templates/hook.js +0 -5
  86. package/dist/templates/hook.js.map +0 -1
  87. package/dist/templates/stylesheet.d.ts +0 -3
  88. package/dist/templates/stylesheet.d.ts.map +0 -1
  89. package/dist/templates/stylesheet.js +0 -7
  90. package/dist/templates/stylesheet.js.map +0 -1
@@ -0,0 +1,33 @@
1
+ {
2
+ "name": "my-app",
3
+ "private": true,
4
+ "version": "0.0.0",
5
+ "type": "module",
6
+ "scripts": {
7
+ "dev": "vite",
8
+ "build": "tsc -b && vite build",
9
+ "lint": "eslint .",
10
+ "preview": "vite preview"
11
+ },
12
+ "dependencies": {
13
+ "@tanstack/react-query": "^5.106.1",
14
+ "react": "^19.3.1",
15
+ "react-dom": "^19.3.1",
16
+ "react-router": "^8.5.1",
17
+ "sass": "^1.107.1"
18
+ },
19
+ "devDependencies": {
20
+ "@eslint/js": "^10.0.1",
21
+ "@types/node": "^24.19.2",
22
+ "@types/react": "^19.3.0",
23
+ "@types/react-dom": "^19.3.0",
24
+ "@vitejs/plugin-react": "^6.1.2",
25
+ "eslint": "^10.14.0",
26
+ "eslint-plugin-react-hooks": "^7.1.1",
27
+ "eslint-plugin-react-refresh": "^0.5.7",
28
+ "globals": "^17.13.0",
29
+ "typescript": "~6.0.3",
30
+ "typescript-eslint": "^8.72.1",
31
+ "vite": "^8.3.6"
32
+ }
33
+ }
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="48" height="46" fill="none" viewBox="0 0 48 46"><path fill="#863bff" d="M25.946 44.938c-.664.845-2.021.375-2.021-.698V33.937a2.26 2.26 0 0 0-2.262-2.262H10.287c-.92 0-1.456-1.04-.92-1.788l7.48-10.471c1.07-1.497 0-3.578-1.842-3.578H1.237c-.92 0-1.456-1.04-.92-1.788L10.013.474c.214-.297.556-.474.92-.474h28.894c.92 0 1.456 1.04.92 1.788l-7.48 10.471c-1.07 1.498 0 3.579 1.842 3.579h11.377c.943 0 1.473 1.088.89 1.83L25.947 44.94z" style="fill:#863bff;fill:color(display-p3 .5252 .23 1);fill-opacity:1"/><mask id="a" width="48" height="46" x="0" y="0" maskUnits="userSpaceOnUse" style="mask-type:alpha"><path fill="#000" d="M25.842 44.938c-.664.844-2.021.375-2.021-.698V33.937a2.26 2.26 0 0 0-2.262-2.262H10.183c-.92 0-1.456-1.04-.92-1.788l7.48-10.471c1.07-1.498 0-3.579-1.842-3.579H1.133c-.92 0-1.456-1.04-.92-1.787L9.91.473c.214-.297.556-.474.92-.474h28.894c.92 0 1.456 1.04.92 1.788l-7.48 10.471c-1.07 1.498 0 3.578 1.842 3.578h11.377c.943 0 1.473 1.088.89 1.832L25.843 44.94z" style="fill:#000;fill-opacity:1"/></mask><g mask="url(#a)"><g filter="url(#b)"><ellipse cx="5.508" cy="14.704" fill="#ede6ff" rx="5.508" ry="14.704" style="fill:#ede6ff;fill:color(display-p3 .9275 .9033 1);fill-opacity:1" transform="matrix(.00324 1 1 -.00324 -4.47 31.516)"/></g><g filter="url(#c)"><ellipse cx="10.399" cy="29.851" fill="#ede6ff" rx="10.399" ry="29.851" style="fill:#ede6ff;fill:color(display-p3 .9275 .9033 1);fill-opacity:1" transform="matrix(.00324 1 1 -.00324 -39.328 7.883)"/></g><g filter="url(#d)"><ellipse cx="5.508" cy="30.487" fill="#7e14ff" rx="5.508" ry="30.487" style="fill:#7e14ff;fill:color(display-p3 .4922 .0767 1);fill-opacity:1" transform="rotate(89.814 -25.913 -14.639)scale(1 -1)"/></g><g filter="url(#e)"><ellipse cx="5.508" cy="30.599" fill="#7e14ff" rx="5.508" ry="30.599" style="fill:#7e14ff;fill:color(display-p3 .4922 .0767 1);fill-opacity:1" transform="rotate(89.814 -32.644 -3.334)scale(1 -1)"/></g><g filter="url(#f)"><ellipse cx="5.508" cy="30.599" fill="#7e14ff" rx="5.508" ry="30.599" style="fill:#7e14ff;fill:color(display-p3 .4922 .0767 1);fill-opacity:1" transform="matrix(.00324 1 1 -.00324 -34.34 30.47)"/></g><g filter="url(#g)"><ellipse cx="14.072" cy="22.078" fill="#ede6ff" rx="14.072" ry="22.078" style="fill:#ede6ff;fill:color(display-p3 .9275 .9033 1);fill-opacity:1" transform="rotate(93.35 24.506 48.493)scale(-1 1)"/></g><g filter="url(#h)"><ellipse cx="3.47" cy="21.501" fill="#7e14ff" rx="3.47" ry="21.501" style="fill:#7e14ff;fill:color(display-p3 .4922 .0767 1);fill-opacity:1" transform="rotate(89.009 28.708 47.59)scale(-1 1)"/></g><g filter="url(#i)"><ellipse cx="3.47" cy="21.501" fill="#7e14ff" rx="3.47" ry="21.501" style="fill:#7e14ff;fill:color(display-p3 .4922 .0767 1);fill-opacity:1" transform="rotate(89.009 28.708 47.59)scale(-1 1)"/></g><g filter="url(#j)"><ellipse cx=".387" cy="8.972" fill="#7e14ff" rx="4.407" ry="29.108" style="fill:#7e14ff;fill:color(display-p3 .4922 .0767 1);fill-opacity:1" transform="rotate(39.51 .387 8.972)"/></g><g filter="url(#k)"><ellipse cx="47.523" cy="-6.092" fill="#7e14ff" rx="4.407" ry="29.108" style="fill:#7e14ff;fill:color(display-p3 .4922 .0767 1);fill-opacity:1" transform="rotate(37.892 47.523 -6.092)"/></g><g filter="url(#l)"><ellipse cx="41.412" cy="6.333" fill="#47bfff" rx="5.971" ry="9.665" style="fill:#47bfff;fill:color(display-p3 .2799 .748 1);fill-opacity:1" transform="rotate(37.892 41.412 6.333)"/></g><g filter="url(#m)"><ellipse cx="-1.879" cy="38.332" fill="#7e14ff" rx="4.407" ry="29.108" style="fill:#7e14ff;fill:color(display-p3 .4922 .0767 1);fill-opacity:1" transform="rotate(37.892 -1.88 38.332)"/></g><g filter="url(#n)"><ellipse cx="-1.879" cy="38.332" fill="#7e14ff" rx="4.407" ry="29.108" style="fill:#7e14ff;fill:color(display-p3 .4922 .0767 1);fill-opacity:1" transform="rotate(37.892 -1.88 38.332)"/></g><g filter="url(#o)"><ellipse cx="35.651" cy="29.907" fill="#7e14ff" rx="4.407" ry="29.108" style="fill:#7e14ff;fill:color(display-p3 .4922 .0767 1);fill-opacity:1" transform="rotate(37.892 35.651 29.907)"/></g><g filter="url(#p)"><ellipse cx="38.418" cy="32.4" fill="#47bfff" rx="5.971" ry="15.297" style="fill:#47bfff;fill:color(display-p3 .2799 .748 1);fill-opacity:1" transform="rotate(37.892 38.418 32.4)"/></g></g><defs><filter id="b" width="60.045" height="41.654" x="-19.77" y="16.149" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17158" stdDeviation="7.659"/></filter><filter id="c" width="90.34" height="51.437" x="-54.613" y="-7.533" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17158" stdDeviation="7.659"/></filter><filter id="d" width="79.355" height="29.4" x="-49.64" y="2.03" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17158" stdDeviation="4.596"/></filter><filter id="e" width="79.579" height="29.4" x="-45.045" y="20.029" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17158" stdDeviation="4.596"/></filter><filter id="f" width="79.579" height="29.4" x="-43.513" y="21.178" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17158" stdDeviation="4.596"/></filter><filter id="g" width="74.749" height="58.852" x="15.756" y="-17.901" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17158" stdDeviation="7.659"/></filter><filter id="h" width="61.377" height="25.362" x="23.548" y="2.284" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17158" stdDeviation="4.596"/></filter><filter id="i" width="61.377" height="25.362" x="23.548" y="2.284" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17158" stdDeviation="4.596"/></filter><filter id="j" width="56.045" height="63.649" x="-27.636" y="-22.853" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17158" stdDeviation="4.596"/></filter><filter id="k" width="54.814" height="64.646" x="20.116" y="-38.415" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17158" stdDeviation="4.596"/></filter><filter id="l" width="33.541" height="35.313" x="24.641" y="-11.323" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17158" stdDeviation="4.596"/></filter><filter id="m" width="54.814" height="64.646" x="-29.286" y="6.009" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17158" stdDeviation="4.596"/></filter><filter id="n" width="54.814" height="64.646" x="-29.286" y="6.009" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17158" stdDeviation="4.596"/></filter><filter id="o" width="54.814" height="64.646" x="8.244" y="-2.416" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17158" stdDeviation="4.596"/></filter><filter id="p" width="39.409" height="43.623" x="18.713" y="10.588" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17158" stdDeviation="4.596"/></filter></defs></svg>
@@ -0,0 +1,12 @@
1
+ import Providers from "./providers";
2
+ import AppRoutes from "./routes";
3
+
4
+ const App = () => {
5
+ return (
6
+ <Providers>
7
+ <AppRoutes />
8
+ </Providers>
9
+ );
10
+ };
11
+
12
+ export default App;
@@ -0,0 +1,16 @@
1
+ import { BrowserRouter } from "react-router";
2
+ import { QueryClientProvider } from "@tanstack/react-query";
3
+ import queryClient from "@/lib/queryClient";
4
+ import type { PropsWithChildren } from "react";
5
+
6
+ type ProvidersProps = {} & PropsWithChildren;
7
+
8
+ const Providers = ({ children }: ProvidersProps) => {
9
+ return (
10
+ <QueryClientProvider client={queryClient}>
11
+ <BrowserRouter>{children}</BrowserRouter>
12
+ </QueryClientProvider>
13
+ );
14
+ };
15
+
16
+ export default Providers;
@@ -0,0 +1,19 @@
1
+ import { Suspense, lazy } from "react";
2
+ import { Routes, Route } from "react-router";
3
+
4
+ const HomePage = lazy(() => import("@/pages/home/Home"));
5
+
6
+ const AppRoutes = () => {
7
+ return (
8
+ <Suspense fallback={<div>Loading...</div>}>
9
+ <Routes>
10
+ <Route path="/" element={<HomePage />} />
11
+
12
+ {/* Fallback route, must be last */}
13
+ <Route path="*" element={<div>404 Page Not Found</div>} />
14
+ </Routes>
15
+ </Suspense>
16
+ );
17
+ };
18
+
19
+ export default AppRoutes;
@@ -0,0 +1,14 @@
1
+ import type { QueryClientConfig } from "@tanstack/react-query";
2
+
3
+ const STALE_TIME_MINS = 5;
4
+ const STALE_TIME_MILLISECONDS = STALE_TIME_MINS * 60 * 1000;
5
+
6
+ export const queryClientConfig: QueryClientConfig= {
7
+ defaultOptions: {
8
+ queries: {
9
+ refetchOnWindowFocus: false,
10
+ retry: 1,
11
+ staleTime: STALE_TIME_MILLISECONDS,
12
+ },
13
+ },
14
+ }
@@ -0,0 +1,6 @@
1
+ import { QueryClient } from "@tanstack/react-query";
2
+ import { queryClientConfig } from "../config/queryClient.config";
3
+
4
+ const queryClient = new QueryClient(queryClientConfig);
5
+
6
+ export default queryClient;
@@ -0,0 +1,13 @@
1
+ import { StrictMode } from "react";
2
+ import { createRoot } from "react-dom/client";
3
+ import App from "./app/App.tsx";
4
+
5
+ const rootEl = document.getElementById("root");
6
+ if (!rootEl) throw new Error("root element wasn't found");
7
+ const root = createRoot(rootEl);
8
+
9
+ root.render(
10
+ <StrictMode>
11
+ <App />
12
+ </StrictMode>,
13
+ );
@@ -0,0 +1,11 @@
1
+ import styles from "./Home.module.scss";
2
+
3
+ const HomePage = () => {
4
+ return (
5
+ <div className={styles.home}>
6
+ <h1>Home Page</h1>
7
+ </div>
8
+ );
9
+ };
10
+
11
+ export default HomePage;
@@ -0,0 +1,29 @@
1
+ {
2
+ "compilerOptions": {
3
+ "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
4
+ "target": "es2023",
5
+ "lib": ["ES2023", "DOM"],
6
+ "module": "esnext",
7
+ "types": ["vite/client"],
8
+ "allowArbitraryExtensions": true,
9
+ "skipLibCheck": true,
10
+ "paths": {
11
+ "@/*": ["./src/*"]
12
+ },
13
+
14
+ /* Bundler mode */
15
+ "moduleResolution": "bundler",
16
+ "allowImportingTsExtensions": true,
17
+ "verbatimModuleSyntax": true,
18
+ "moduleDetection": "force",
19
+ "noEmit": true,
20
+ "jsx": "react-jsx",
21
+
22
+ /* Linting */
23
+ "noUnusedLocals": true,
24
+ "noUnusedParameters": true,
25
+ "erasableSyntaxOnly": true,
26
+ "noFallthroughCasesInSwitch": true
27
+ },
28
+ "include": ["src"]
29
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "files": [],
3
+ "references": [
4
+ { "path": "./tsconfig.app.json" },
5
+ { "path": "./tsconfig.node.json" }
6
+ ]
7
+ }
@@ -0,0 +1,23 @@
1
+ {
2
+ "compilerOptions": {
3
+ "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo",
4
+ "target": "es2023",
5
+ "lib": ["ES2023"],
6
+ "types": ["node"],
7
+ "skipLibCheck": true,
8
+
9
+ /* Bundler mode */
10
+ "module": "nodenext",
11
+ "allowImportingTsExtensions": true,
12
+ "verbatimModuleSyntax": true,
13
+ "moduleDetection": "force",
14
+ "noEmit": true,
15
+
16
+ /* Linting */
17
+ "noUnusedLocals": true,
18
+ "noUnusedParameters": true,
19
+ "erasableSyntaxOnly": true,
20
+ "noFallthroughCasesInSwitch": true
21
+ },
22
+ "include": ["vite.config.ts"]
23
+ }
@@ -0,0 +1,18 @@
1
+ import react from "@vitejs/plugin-react";
2
+ import path from "path";
3
+ import { defineConfig } from "vite";
4
+
5
+ // https://vite.dev/config/
6
+ export default defineConfig({
7
+ plugins: [react()],
8
+ resolve: {
9
+ alias: {
10
+ "@": path.resolve(import.meta.dirname, "src"),
11
+ },
12
+ },
13
+ css: {
14
+ modules: {
15
+ localsConvention: "camelCase",
16
+ },
17
+ },
18
+ });
@@ -0,0 +1,3 @@
1
+ .__CLASSNAME__ {
2
+ // scss code
3
+ }
@@ -1,3 +0,0 @@
1
- declare const buildComponentTemplate: (name: string, stylesheetExt: string, componentExt: string) => string;
2
- export default buildComponentTemplate;
3
- //# sourceMappingURL=component.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../src/templates/component.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,sBAAsB,SACpB,MAAM,iBACG,MAAM,gBACP,MAAM,WASrB,CAAC;eAEa,sBAAsB"}
@@ -1,11 +0,0 @@
1
- const buildComponentTemplate = (name, stylesheetExt, componentExt) => {
2
- return `import styles from "./${name}.module.${stylesheetExt}"
3
- import { use${name} } from "./use${name}.${componentExt}"
4
-
5
- export const ${name} = () => {
6
- const hook = use${name}();
7
- return <div className={styles.${name.toLowerCase()}></div>
8
- }`;
9
- };
10
- export default buildComponentTemplate;
11
- //# sourceMappingURL=component.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"component.js","sourceRoot":"","sources":["../../src/templates/component.ts"],"names":[],"mappings":"AAAA,MAAM,sBAAsB,GAAG,CAC7B,IAAY,EACZ,aAAqB,EACrB,YAAoB,EACpB,EAAE;IACF,OAAO,yBAAyB,IAAI,WAAW,aAAa;cAChD,IAAI,iBAAiB,IAAI,IAAI,YAAY;;eAExC,IAAI;oBACC,IAAI;kCACU,IAAI,CAAC,WAAW,EAAE;EAClD,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,sBAAsB,CAAC"}
@@ -1,3 +0,0 @@
1
- declare const buildHookTemplate: (name: string) => string;
2
- export default buildHookTemplate;
3
- //# sourceMappingURL=hook.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"hook.d.ts","sourceRoot":"","sources":["../../src/templates/hook.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,iBAAiB,SAAU,MAAM,WAEtC,CAAC;eAEa,iBAAiB"}
@@ -1,5 +0,0 @@
1
- const buildHookTemplate = (name) => {
2
- return `export const use${name} = () => {}`;
3
- };
4
- export default buildHookTemplate;
5
- //# sourceMappingURL=hook.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"hook.js","sourceRoot":"","sources":["../../src/templates/hook.ts"],"names":[],"mappings":"AAAA,MAAM,iBAAiB,GAAG,CAAC,IAAY,EAAE,EAAE;IACzC,OAAO,mBAAmB,IAAI,aAAa,CAAC;AAC9C,CAAC,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
@@ -1,3 +0,0 @@
1
- declare const buildStylesheetTemplate: (name: string) => string;
2
- export default buildStylesheetTemplate;
3
- //# sourceMappingURL=stylesheet.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"stylesheet.d.ts","sourceRoot":"","sources":["../../src/templates/stylesheet.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,uBAAuB,SAAU,MAAM,WAI5C,CAAC;eAEa,uBAAuB"}
@@ -1,7 +0,0 @@
1
- const buildStylesheetTemplate = (name) => {
2
- return `.${name.toLowerCase()} {
3
- // Styles go here
4
- }`;
5
- };
6
- export default buildStylesheetTemplate;
7
- //# sourceMappingURL=stylesheet.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"stylesheet.js","sourceRoot":"","sources":["../../src/templates/stylesheet.ts"],"names":[],"mappings":"AAAA,MAAM,uBAAuB,GAAG,CAAC,IAAY,EAAE,EAAE;IAC/C,OAAO,IAAI,IAAI,CAAC,WAAW,EAAE;;EAE7B,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,uBAAuB,CAAC"}