create-template-project 0.1.0 → 0.3.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.
- package/README.md +11 -11
- package/dist/config/dependencies.json +60 -44
- package/dist/index.js +1221 -0
- package/dist/templates/base/files/.github/workflows/node.js.yml +5 -3
- package/dist/templates/base/files/.husky/commit-msg +1 -0
- package/dist/templates/base/files/.husky/pre-commit +1 -0
- package/dist/templates/base/files/.prettierignore +53 -0
- package/dist/templates/base/files/.prettierrc.json +4 -2
- package/dist/templates/base/files/AGENTS.md +5 -2
- package/dist/templates/base/files/README.md +36 -13
- package/dist/templates/base/files/_oxlint.config.ts +17 -33
- package/dist/templates/base/files/package.json +1 -1
- package/dist/templates/base/files/tsconfig.json +32 -32
- package/dist/templates/base/files/vitest.config.ts +11 -2
- package/dist/templates/cli/files/package.json +4 -3
- package/dist/templates/cli/files/src/index.test.ts +10 -2
- package/dist/templates/cli/files/src/index.ts +4 -1
- package/dist/templates/cli/files/src/lib.ts +10 -0
- package/dist/templates/cli/files/vite.config.ts +22 -0
- package/dist/templates/web-app/files/index.html +11 -0
- package/dist/templates/web-app/files/playwright.config.ts +26 -0
- package/dist/templates/web-app/files/src/App.test.tsx +9 -0
- package/dist/templates/web-app/files/src/App.tsx +14 -0
- package/dist/templates/web-app/files/src/index.tsx +8 -0
- package/dist/templates/web-app/files/tests/e2e/basic.e2e-test.ts +13 -0
- package/dist/templates/web-app/files/vite.config.ts +34 -0
- package/dist/templates/web-fullstack/files/client/index.html +10 -0
- package/dist/templates/{fullstack → web-fullstack}/files/client/package.json +2 -2
- package/dist/templates/web-fullstack/files/client/src/App.test.tsx +11 -0
- package/dist/templates/{fullstack → web-fullstack}/files/client/src/contexts/AuthContext.tsx +1 -5
- package/dist/templates/{fullstack → web-fullstack}/files/client/src/pages/Login.tsx +4 -33
- package/dist/templates/web-fullstack/files/client/vite.config.ts +30 -0
- package/dist/templates/{fullstack → web-fullstack}/files/package.json +1 -2
- package/dist/templates/web-fullstack/files/playwright.config.ts +33 -0
- package/dist/templates/{fullstack → web-fullstack}/files/server/package.json +2 -2
- package/dist/templates/web-fullstack/files/server/src/index.test.ts +28 -0
- package/dist/templates/{fullstack → web-fullstack}/files/server/src/trpc.ts +1 -1
- package/dist/templates/web-fullstack/files/server/vite.config.ts +24 -0
- package/dist/templates/web-fullstack/files/tests/e2e/basic.e2e-test.ts +14 -0
- package/dist/templates/web-vanilla/files/index.html +11 -0
- package/dist/templates/web-vanilla/files/package.json +17 -0
- package/dist/templates/web-vanilla/files/playwright.config.ts +26 -0
- package/dist/templates/web-vanilla/files/src/index.test.ts +12 -0
- package/dist/templates/web-vanilla/files/src/index.ts +3 -0
- package/dist/templates/web-vanilla/files/src/lib.ts +9 -0
- package/dist/templates/web-vanilla/files/tests/e2e/basic.e2e-test.ts +11 -0
- package/dist/templates/web-vanilla/files/vite.config.ts +28 -0
- package/package.json +25 -27
- package/dist/cli.mjs +0 -272
- package/dist/generators/project.mjs +0 -354
- package/dist/index.d.mts +0 -4
- package/dist/index.mjs +0 -32
- package/dist/templates/base/index.mjs +0 -16
- package/dist/templates/cli/files/tsdown.config.ts +0 -3
- package/dist/templates/cli/index.mjs +0 -16
- package/dist/templates/fullstack/files/client/index.html +0 -8
- package/dist/templates/fullstack/files/client/src/App.test.tsx +0 -8
- package/dist/templates/fullstack/files/client/tsdown.config.ts +0 -3
- package/dist/templates/fullstack/files/server/src/index.test.ts +0 -7
- package/dist/templates/fullstack/files/server/tsdown.config.ts +0 -3
- package/dist/templates/fullstack/index.mjs +0 -42
- package/dist/templates/webapp/files/backend/src/index.ts +0 -17
- package/dist/templates/webapp/files/frontend/index.html +0 -9
- package/dist/templates/webapp/files/frontend/src/index.ts +0 -4
- package/dist/templates/webapp/files/package.json +0 -13
- package/dist/templates/webapp/files/src/index.test.ts +0 -5
- package/dist/templates/webapp/files/tsdown.config.ts +0 -10
- package/dist/templates/webapp/index.mjs +0 -16
- package/dist/templates/webpage/files/index.html +0 -8
- package/dist/templates/webpage/files/package.json +0 -8
- package/dist/templates/webpage/files/src/index.test.ts +0 -5
- package/dist/templates/webpage/files/src/index.ts +0 -1
- package/dist/templates/webpage/index.mjs +0 -16
- package/dist/types.mjs +0 -30
- package/dist/utils/file.mjs +0 -101
- /package/dist/templates/{fullstack → web-fullstack}/files/client/src/App.tsx +0 -0
- /package/dist/templates/{fullstack → web-fullstack}/files/client/src/components/ProtectedRoute.tsx +0 -0
- /package/dist/templates/{fullstack → web-fullstack}/files/client/src/main.tsx +0 -0
- /package/dist/templates/{fullstack → web-fullstack}/files/client/src/pages/Dashboard.tsx +0 -0
- /package/dist/templates/{fullstack → web-fullstack}/files/client/src/trpc.ts +0 -0
- /package/dist/templates/{fullstack → web-fullstack}/files/server/src/context.ts +0 -0
- /package/dist/templates/{fullstack → web-fullstack}/files/server/src/index.ts +0 -0
- /package/dist/templates/{fullstack → web-fullstack}/files/server/src/routers/_app.ts +0 -0
- /package/dist/templates/{fullstack → web-fullstack}/files/server/src/routers/auth.ts +0 -0
package/README.md
CHANGED
|
@@ -5,14 +5,14 @@
|
|
|
5
5
|
[](https://github.com/doberkofler/create-template-project/actions/workflows/node.js.yml)
|
|
6
6
|
[](https://coveralls.io/github/doberkofler/create-template-project?branch=master)
|
|
7
7
|
|
|
8
|
-
An ultra-modular, type-safe Node.js CLI tool used to scaffold new project templates (CLI,
|
|
8
|
+
An ultra-modular, type-safe Node.js CLI tool used to scaffold new project templates (CLI, Web-Vanilla, Web-App, Web-Fullstack) with best-practice configurations pre-installed.
|
|
9
9
|
|
|
10
10
|
## Features
|
|
11
11
|
|
|
12
12
|
- **Modern Tech Stack:** All templates come with `commitlint`, `husky`, `vitest`, `oxlint`, `prettier`, and `typescript` (strict mode).
|
|
13
13
|
- **Interactive CLI:** Prompts you for project details if CLI arguments are missing, using `@clack/prompts`.
|
|
14
14
|
- **Update Mode:** Detects existing projects and offers a safe update path using `git merge-file`.
|
|
15
|
-
- **No-Build Option:** Supports creating simple projects without a build step (strips
|
|
15
|
+
- **No-Build Option:** Supports creating simple projects without a build step (strips Vite).
|
|
16
16
|
- **GitHub Integration:** Automatically initializes a Git repository and can create a GitHub repository using the `gh` CLI.
|
|
17
17
|
- **CI Ready:** Generates GitHub Actions workflows for automated testing and linting.
|
|
18
18
|
|
|
@@ -63,29 +63,29 @@ create-template-project update --template cli --name existing-project
|
|
|
63
63
|
|
|
64
64
|
#### Command Options (create/update):
|
|
65
65
|
|
|
66
|
-
- `-t, --template <type>`: Template type (`cli`, `
|
|
66
|
+
- `-t, --template <type>`: Template type (`cli`, `web-vanilla`, `web-app`, `web-fullstack`)
|
|
67
67
|
- `-n, --name <name>`: Project name
|
|
68
68
|
- `--github`: Create GitHub project (requires `gh` CLI authenticated)
|
|
69
69
|
- `-d, --directory <path>`: Output directory (defaults to `.`)
|
|
70
70
|
- `--overwrite`: Overwrite existing directory by removing it first (create & update)
|
|
71
|
-
- `--no-build`: Create a project without a build step (not allowed for `
|
|
72
|
-
- `--
|
|
71
|
+
- `--no-build`: Create a project without a build step (not allowed for `web-app`)
|
|
72
|
+
- `--no-progress`: Do not show progress indicators (useful for AI environments)
|
|
73
73
|
|
|
74
74
|
## Project Templates
|
|
75
75
|
|
|
76
76
|
### 🟢 CLI
|
|
77
|
-
A clean Node.js CLI environment featuring `commander` and `cli-progress`. Supports optional
|
|
77
|
+
A clean Node.js CLI environment featuring `commander` and `cli-progress`. Supports optional Vite bundling.
|
|
78
78
|
|
|
79
|
-
### 🔵
|
|
79
|
+
### 🔵 Web-Vanilla
|
|
80
80
|
Standalone web page setup for modern browsers. Can be used with or without a build step.
|
|
81
81
|
|
|
82
|
-
### 🟡
|
|
83
|
-
|
|
82
|
+
### 🟡 Web-App
|
|
83
|
+
Modern React application featuring MUI components and TanStack Query for state management.
|
|
84
84
|
|
|
85
|
-
### ⚛️ Fullstack
|
|
85
|
+
### ⚛️ Web-Fullstack
|
|
86
86
|
A full-stack monorepo featuring:
|
|
87
87
|
- **Client**: React with MUI (including Icons) and TypeScript.
|
|
88
|
-
- **Server**: Express.js backend.
|
|
88
|
+
- **Server**: Express.js backend with tRPC for end-to-end type safety.
|
|
89
89
|
- **E2E**: Playwright for end-to-end testing.
|
|
90
90
|
|
|
91
91
|
## Contributing
|
|
@@ -1,156 +1,172 @@
|
|
|
1
1
|
{
|
|
2
2
|
"dependencies": {
|
|
3
|
+
"vite": {
|
|
4
|
+
"version": "8.0.1",
|
|
5
|
+
"description": "Native-ESM powered web dev build tool"
|
|
6
|
+
},
|
|
7
|
+
"@vitejs/plugin-react": {
|
|
8
|
+
"version": "6.0.1",
|
|
9
|
+
"description": "The default Vite plugin for React projects."
|
|
10
|
+
},
|
|
11
|
+
"@vitest/browser": {
|
|
12
|
+
"version": "4.1.0",
|
|
13
|
+
"description": "Run Vitest in the browser."
|
|
14
|
+
},
|
|
15
|
+
"@vitest/browser-playwright": {
|
|
16
|
+
"version": "4.1.0",
|
|
17
|
+
"description": "Playwright provider for Vitest browser mode."
|
|
18
|
+
},
|
|
19
|
+
"playwright": {
|
|
20
|
+
"version": "1.58.2",
|
|
21
|
+
"description": "Framework for Web-browser automation."
|
|
22
|
+
},
|
|
3
23
|
"debug": {
|
|
4
|
-
"version": "
|
|
24
|
+
"version": "4.4.3",
|
|
5
25
|
"description": "A tiny JavaScript debugging utility modelled after Node.js core debugging technique."
|
|
6
26
|
},
|
|
7
27
|
"@commitlint/cli": {
|
|
8
|
-
"version": "
|
|
28
|
+
"version": "20.5.0",
|
|
9
29
|
"description": "Lint commit messages to ensure they follow conventional commits."
|
|
10
30
|
},
|
|
11
31
|
"@commitlint/config-conventional": {
|
|
12
|
-
"version": "
|
|
32
|
+
"version": "20.5.0",
|
|
13
33
|
"description": "Shareable commitlint config enforcing conventional commits."
|
|
14
34
|
},
|
|
15
35
|
"@types/debug": {
|
|
16
|
-
"version": "
|
|
36
|
+
"version": "4.1.13",
|
|
17
37
|
"description": "TypeScript definitions for debug."
|
|
18
38
|
},
|
|
19
39
|
"@types/node": {
|
|
20
|
-
"version": "
|
|
40
|
+
"version": "25.5.0",
|
|
21
41
|
"description": "TypeScript definitions for Node.js."
|
|
22
42
|
},
|
|
23
43
|
"@vitest/coverage-v8": {
|
|
24
|
-
"version": "
|
|
44
|
+
"version": "4.1.0",
|
|
25
45
|
"description": "V8 coverage provider for Vitest."
|
|
26
46
|
},
|
|
27
47
|
"conventional-changelog": {
|
|
28
|
-
"version": "
|
|
48
|
+
"version": "7.2.0",
|
|
29
49
|
"description": "Generate a changelog from git metadata."
|
|
30
50
|
},
|
|
31
51
|
"husky": {
|
|
32
|
-
"version": "
|
|
52
|
+
"version": "9.1.7",
|
|
33
53
|
"description": "Modern native git hooks made easy."
|
|
34
54
|
},
|
|
35
55
|
"oxlint": {
|
|
36
|
-
"version": "
|
|
56
|
+
"version": "1.56.0",
|
|
37
57
|
"description": "A JavaScript linter written in Rust."
|
|
38
58
|
},
|
|
39
59
|
"oxlint-tsgolint": {
|
|
40
|
-
"version": "
|
|
60
|
+
"version": "0.17.1",
|
|
41
61
|
"description": "TypeScript-specific rules for oxlint."
|
|
42
62
|
},
|
|
43
63
|
"prettier": {
|
|
44
|
-
"version": "
|
|
64
|
+
"version": "3.8.1",
|
|
45
65
|
"description": "An opinionated code formatter."
|
|
46
66
|
},
|
|
47
67
|
"typescript": {
|
|
48
|
-
"version": "
|
|
68
|
+
"version": "5.9.3",
|
|
49
69
|
"description": "A superset of JavaScript that compiles to clean JavaScript output."
|
|
50
70
|
},
|
|
51
71
|
"vitest": {
|
|
52
|
-
"version": "
|
|
72
|
+
"version": "4.1.0",
|
|
53
73
|
"description": "A Vite-native unit test framework."
|
|
54
74
|
},
|
|
55
75
|
"commander": {
|
|
56
|
-
"version": "
|
|
76
|
+
"version": "14.0.3",
|
|
57
77
|
"description": "The complete solution for node.js command-line interfaces."
|
|
58
78
|
},
|
|
59
79
|
"cli-progress": {
|
|
60
|
-
"version": "
|
|
80
|
+
"version": "3.12.0",
|
|
61
81
|
"description": "Easy to use progress-bar for command-line/terminal applications."
|
|
62
82
|
},
|
|
63
83
|
"@types/cli-progress": {
|
|
64
|
-
"version": "
|
|
84
|
+
"version": "3.11.6",
|
|
65
85
|
"description": "TypeScript definitions for cli-progress."
|
|
66
86
|
},
|
|
67
|
-
"tsdown": {
|
|
68
|
-
"version": "^0.21.2",
|
|
69
|
-
"description": "A zero-config bundler for TypeScript."
|
|
70
|
-
},
|
|
71
87
|
"express": {
|
|
72
|
-
"version": "
|
|
88
|
+
"version": "5.2.1",
|
|
73
89
|
"description": "Fast, unopinionated, minimalist web framework for Node.js."
|
|
74
90
|
},
|
|
75
91
|
"@types/express": {
|
|
76
|
-
"version": "
|
|
92
|
+
"version": "5.0.6",
|
|
77
93
|
"description": "TypeScript definitions for Express."
|
|
78
94
|
},
|
|
79
95
|
"react": {
|
|
80
|
-
"version": "
|
|
96
|
+
"version": "19.2.4",
|
|
81
97
|
"description": "A JavaScript library for building user interfaces."
|
|
82
98
|
},
|
|
83
99
|
"react-dom": {
|
|
84
|
-
"version": "
|
|
100
|
+
"version": "19.2.4",
|
|
85
101
|
"description": "React package for working with the DOM."
|
|
86
102
|
},
|
|
87
103
|
"@mui/material": {
|
|
88
|
-
"version": "
|
|
104
|
+
"version": "7.3.9",
|
|
89
105
|
"description": "Material UI components."
|
|
90
106
|
},
|
|
91
107
|
"@mui/icons-material": {
|
|
92
|
-
"version": "
|
|
108
|
+
"version": "7.3.9",
|
|
93
109
|
"description": "Material Design icons distributed as SVG React components."
|
|
94
110
|
},
|
|
95
111
|
"@emotion/react": {
|
|
96
|
-
"version": "
|
|
112
|
+
"version": "11.14.0",
|
|
97
113
|
"description": "CSS-in-JS library designed for high performance."
|
|
98
114
|
},
|
|
99
115
|
"@emotion/styled": {
|
|
100
|
-
"version": "
|
|
116
|
+
"version": "11.14.1",
|
|
101
117
|
"description": "Styled components for Emotion."
|
|
102
118
|
},
|
|
103
119
|
"@types/react": {
|
|
104
|
-
"version": "
|
|
120
|
+
"version": "19.2.14",
|
|
105
121
|
"description": "TypeScript definitions for React."
|
|
106
122
|
},
|
|
107
123
|
"@types/react-dom": {
|
|
108
|
-
"version": "
|
|
124
|
+
"version": "19.2.3",
|
|
109
125
|
"description": "TypeScript definitions for React DOM."
|
|
110
126
|
},
|
|
111
127
|
"@playwright/test": {
|
|
112
|
-
"version": "
|
|
128
|
+
"version": "1.58.2",
|
|
113
129
|
"description": "End-to-end testing framework."
|
|
114
130
|
},
|
|
115
131
|
"@trpc/server": {
|
|
116
|
-
"version": "
|
|
132
|
+
"version": "11.14.1",
|
|
117
133
|
"description": "tRPC server library."
|
|
118
134
|
},
|
|
119
135
|
"@trpc/client": {
|
|
120
|
-
"version": "
|
|
136
|
+
"version": "11.14.1",
|
|
121
137
|
"description": "tRPC client library."
|
|
122
138
|
},
|
|
123
139
|
"@trpc/react-query": {
|
|
124
|
-
"version": "
|
|
140
|
+
"version": "11.14.1",
|
|
125
141
|
"description": "tRPC integration for React Query."
|
|
126
142
|
},
|
|
127
143
|
"@tanstack/react-query": {
|
|
128
|
-
"version": "
|
|
144
|
+
"version": "5.94.5",
|
|
129
145
|
"description": "Powerful asynchronous state management for TS/JS."
|
|
130
146
|
},
|
|
131
147
|
"zod": {
|
|
132
|
-
"version": "
|
|
148
|
+
"version": "4.3.6",
|
|
133
149
|
"description": "TypeScript-first schema validation with static type inference."
|
|
134
150
|
},
|
|
135
|
-
"tinyexec": {
|
|
136
|
-
"version": "^1.0.4",
|
|
137
|
-
"description": "A minimal library for executing processes in Node (pinned to 1.0.2 due to broken 1.0.3 release)."
|
|
138
|
-
},
|
|
139
151
|
"react-router-dom": {
|
|
140
|
-
"version": "
|
|
152
|
+
"version": "7.13.1",
|
|
141
153
|
"description": "Declarative routing for React web applications."
|
|
142
154
|
},
|
|
143
155
|
"cors": {
|
|
144
|
-
"version": "
|
|
156
|
+
"version": "2.8.6",
|
|
145
157
|
"description": "Node.js CORS middleware."
|
|
146
158
|
},
|
|
147
159
|
"@types/cors": {
|
|
148
|
-
"version": "
|
|
160
|
+
"version": "2.8.19",
|
|
149
161
|
"description": "TypeScript definitions for cors."
|
|
150
162
|
},
|
|
151
163
|
"eslint-plugin-regexp": {
|
|
152
|
-
"version": "
|
|
164
|
+
"version": "3.1.0",
|
|
153
165
|
"description": "ESLint plugin for finding regexp mistakes and style guide violations."
|
|
166
|
+
},
|
|
167
|
+
"vitest-browser-react": {
|
|
168
|
+
"version": "2.1.0",
|
|
169
|
+
"description": "Native React testing utilities for Vitest browser mode."
|
|
154
170
|
}
|
|
155
171
|
}
|
|
156
172
|
}
|