Skip to content

Commit b5f4393

Browse files
authored
Introduced template selection for both next js and vite react
Introduced template selection for both next js and vite react frameworks
2 parents 629001f + 3f29ff8 commit b5f4393

47 files changed

Lines changed: 3120 additions & 299 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.prettierrc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"semi": true,
3+
"singleQuote": false,
4+
"tabWidth": 2,
5+
"trailingComma": "all"
6+
}

.vscode/settings.json

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
11
{
2-
"cSpell.words": [
3-
"calmui"
4-
]
5-
}
2+
"cSpell.words": ["calmui", "Shadcn"]
3+
}

PUBLISHING_SETUP.md

Lines changed: 0 additions & 101 deletions
This file was deleted.

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,18 @@
44

55
### Why??
66

7-
Ever spent half an hour in a group call debating if it should be `components` or `Components`, `home` or `HomePage`, only to discover three different folder structures by the end of sprint?
7+
Ever spent half an hour in a group call debating if it should be `components` or `Components`, `home` or `HomePage`, only to discover three different folder structures by the end of sprint?
88

99
**CalmUI ends the chaos.**
1010
With project structure, templates, and module files handled for you, you can finally spend less time renaming folders—and more time shipping code.
1111

12-
1312
## 🚀 Features & Benefits
1413

1514
- **Automated, consistent project structure** for React (Vite, Next.js) and more.
1615
- **Custom scaffolding** for modules/routes—never worry about file/folder conventions again.
1716
- **Framework-aware**: detects and adapts to Vite, Next.js, etc.
1817
- **Dynamic route generation** supporting nested and parameterized routes.
18+
- **Pre configured templates** like blank template, admin template (Currently these two are available).
1919
- **TypeScript-first** setup with zero-config ESM/JS switching.
2020
- **Edge case handling**: guards against accidental overwrites and misconfiguration.
2121
- **Easy extensibility**—add your own templates as your needs grow!
@@ -76,6 +76,8 @@ calmui generate-route /my-route/:id
7676
calmui generate-route /my-route/:id/edit
7777
calmui generate-route /product-details/:slug
7878
calmui generate-route /users/accounts/orders/:id/:status/update
79+
calmui generate-route "/(auth)/sign-up" # for routes with route groups
80+
calmui generate-route "/(authenticated)/orders/:orderId" # for routes with route groups
7981
```
8082

8183
- Generates boilerplate, folder structure, and pre-wired modules for each part of the route.

eslint.config.js

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
import js from "@eslint/js";
2+
import tseslint from "@typescript-eslint/eslint-plugin";
3+
import tsparser from "@typescript-eslint/parser";
4+
5+
export default [
6+
js.configs.recommended,
7+
{
8+
files: ["**/*.ts", "**/*.tsx"],
9+
languageOptions: {
10+
parser: tsparser,
11+
parserOptions: {
12+
ecmaVersion: "latest",
13+
sourceType: "module",
14+
},
15+
globals: {
16+
console: "readonly",
17+
process: "readonly",
18+
Buffer: "readonly",
19+
__dirname: "readonly",
20+
__filename: "readonly",
21+
global: "readonly",
22+
module: "readonly",
23+
require: "readonly",
24+
},
25+
},
26+
plugins: {
27+
"@typescript-eslint": tseslint,
28+
},
29+
rules: {
30+
// 1. No unused vars with underscore prefix exception
31+
"no-unused-vars": "off",
32+
"@typescript-eslint/no-unused-vars": [
33+
"error",
34+
{
35+
vars: "all",
36+
args: "after-used",
37+
ignoreRestSiblings: true,
38+
varsIgnorePattern: "^_",
39+
argsIgnorePattern: "^_",
40+
caughtErrorsIgnorePattern: "^_",
41+
destructuredArrayIgnorePattern: "^_",
42+
},
43+
],
44+
45+
// 2. No extra whitespaces and newlines
46+
"no-trailing-spaces": "error",
47+
"no-multiple-empty-lines": [
48+
"error",
49+
{
50+
max: 1,
51+
maxEOF: 0,
52+
maxBOF: 0,
53+
},
54+
],
55+
"eol-last": ["error", "always"],
56+
"no-irregular-whitespace": "error",
57+
"no-mixed-spaces-and-tabs": "error",
58+
59+
// Additional whitespace rules
60+
semi: ["error", "always"],
61+
quotes: ["error", "double", { avoidEscape: true }],
62+
"comma-spacing": ["error", { before: false, after: true }],
63+
"key-spacing": ["error", { beforeColon: false, afterColon: true }],
64+
"space-before-blocks": "error",
65+
"space-infix-ops": "error",
66+
"object-curly-spacing": ["error", "always"],
67+
"array-bracket-spacing": ["error", "never"],
68+
},
69+
},
70+
{
71+
files: ["**/*.d.ts"],
72+
rules: {
73+
"@typescript-eslint/no-unused-vars": "off",
74+
},
75+
},
76+
{
77+
ignores: [
78+
"**/node_modules/**",
79+
"**/dist/**",
80+
"**/build/**",
81+
"**/src/templates/*/project-files/",
82+
],
83+
},
84+
];

0 commit comments

Comments
 (0)