create-template-project 0.4.0 → 1.0.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/LICENSE +1 -1
- package/README.md +57 -12
- package/dist/config/dependencies.json +13 -13
- package/dist/index.js +553 -183
- package/dist/templates/base/files/.github/workflows/node.js.yml +38 -10
- package/dist/templates/base/files/AGENTS.md +6 -5
- package/dist/templates/base/files/CONTRIBUTING.md +4 -4
- package/dist/templates/base/files/LICENSE +21 -0
- package/dist/templates/base/files/README.md +16 -14
- package/dist/templates/base/files/_oxc.config.ts +95 -0
- package/dist/templates/base/files/_oxfmt.config.ts +2 -0
- package/dist/templates/base/files/_oxlint.config.ts +2 -58
- package/dist/templates/base/files/package.json +30 -30
- package/dist/templates/base/files/vitest.config.ts +1 -1
- package/dist/templates/cli/files/package.json +2 -1
- package/dist/templates/cli/files/vite.config.ts +1 -1
- package/dist/templates/web-app/files/vite.config.ts +1 -1
- package/dist/templates/web-fullstack/files/client/vite.config.ts +1 -1
- package/dist/templates/web-fullstack/files/package.json +1 -1
- package/dist/templates/web-fullstack/files/server/vite.config.ts +1 -1
- package/dist/templates/web-vanilla/files/package.json +1 -1
- package/dist/templates/web-vanilla/files/vite.config.ts +1 -1
- package/package.json +93 -75
- package/dist/templates/base/files/.prettierignore +0 -53
- package/dist/templates/base/files/.prettierrc.json +0 -8
package/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -2,16 +2,30 @@
|
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/package/create-template-project)
|
|
4
4
|
[](https://www.npmjs.com/package/create-template-project)
|
|
5
|
+
[](https://opensource.org/licenses/MIT)
|
|
5
6
|
[](https://github.com/doberkofler/create-template-project/actions/workflows/node.js.yml)
|
|
6
|
-
[](https://coveralls.io/github/doberkofler/create-template-project?branch=main)
|
|
7
8
|
|
|
8
9
|
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
10
|
|
|
10
|
-
##
|
|
11
|
+
## 🚀 Quick Start
|
|
11
12
|
|
|
12
|
-
|
|
13
|
+
Run directly without installation:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
npx create-template-project interactive
|
|
17
|
+
# or
|
|
18
|
+
pnpm dlx create-template-project interactive
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## ✨ Features
|
|
22
|
+
|
|
23
|
+
- **Modern Tech Stack:** All templates come with `commitlint`, `husky`, `vitest`, `oxlint`, `oxfmt`, and `typescript` (strict mode).
|
|
13
24
|
- **Interactive CLI:** Prompts you for project details if CLI arguments are missing, using `@clack/prompts`.
|
|
14
|
-
-
|
|
25
|
+
- **🔄 Update Mode:** Detects existing projects and offers a safe update path.
|
|
26
|
+
- **Intelligent Tracking:** Automatically generates a detailed `GENERATED.md` with an "Upgrade Details" table showing exactly what changed, why, and what actions (like conflict resolution) are needed.
|
|
27
|
+
- **Seed File Protection:** Files in `src/`, all `*.md` files, and other core files are skipped to protect your application logic and custom documentation.
|
|
28
|
+
- **Tooling Sync:** Keeps your project's boilerplate (linting, CI, configs, scripts) up-to-date with the latest template versions.
|
|
15
29
|
- **No-Build Option:** Supports creating simple projects without a build step (strips Vite).
|
|
16
30
|
- **GitHub Integration:** Automatically initializes a Git repository and can create a GitHub repository using the `gh` CLI.
|
|
17
31
|
- **CI Ready:** Generates GitHub Actions workflows for automated testing and linting.
|
|
@@ -19,12 +33,16 @@ An ultra-modular, type-safe Node.js CLI tool used to scaffold new project templa
|
|
|
19
33
|
## Installation
|
|
20
34
|
|
|
21
35
|
```bash
|
|
36
|
+
pnpm add -g create-template-project
|
|
37
|
+
# or
|
|
22
38
|
npm install -g create-template-project
|
|
23
39
|
```
|
|
24
40
|
|
|
25
|
-
Or run directly using npx:
|
|
41
|
+
Or run directly using pnpm dlx or npx:
|
|
26
42
|
|
|
27
43
|
```bash
|
|
44
|
+
pnpm dlx create-template-project
|
|
45
|
+
# or
|
|
28
46
|
npx create-template-project
|
|
29
47
|
```
|
|
30
48
|
|
|
@@ -47,43 +65,70 @@ You can skip the wizard by using the `create` or `update` commands with the appr
|
|
|
47
65
|
#### Create a new project
|
|
48
66
|
|
|
49
67
|
```bash
|
|
50
|
-
create-template-project create --template cli --name my-cool-tool --github
|
|
68
|
+
create-template-project create --template cli --name my-cool-tool --path ./my-cool-tool --github
|
|
51
69
|
```
|
|
52
70
|
|
|
53
71
|
#### Update an existing project
|
|
54
72
|
|
|
55
73
|
```bash
|
|
56
|
-
create-template-project update --template cli
|
|
74
|
+
create-template-project update --template cli
|
|
57
75
|
```
|
|
58
76
|
|
|
59
77
|
#### Global Options:
|
|
60
78
|
|
|
79
|
+
- `--debug`: Enable debug output
|
|
61
80
|
- `-h, --help`: Show help
|
|
62
81
|
- `-V, --version`: Show version
|
|
63
82
|
|
|
64
|
-
#### Command Options (create
|
|
83
|
+
#### Command Options (create):
|
|
65
84
|
|
|
66
85
|
- `-t, --template <type>`: Template type (`cli`, `web-vanilla`, `web-app`, `web-fullstack`)
|
|
67
86
|
- `-n, --name <name>`: Project name
|
|
68
|
-
- `--
|
|
87
|
+
- `--description <description>`: Project description
|
|
88
|
+
- `-k, --keywords <keywords>`: Project keywords (comma separated)
|
|
89
|
+
- `-a, --author <author>`: Author name (defaults to 'git config user.name')
|
|
90
|
+
- `--github-username <username>`: GitHub username (defaults to 'git config github.user')
|
|
91
|
+
- `-p, --package-manager <pm>`: Package manager (`npm`, `pnpm`, `yarn`) (defaults to `pnpm`)
|
|
92
|
+
- `--create-github-repository`: Create GitHub project (requires `gh` CLI authenticated)
|
|
93
|
+
- `--path <path>`: Output directory (mandatory)
|
|
94
|
+
- `--install-dependencies`: Install dependencies after scaffolding
|
|
95
|
+
- `--build`: Run the CI script (lint, build, test) after scaffolding
|
|
96
|
+
- `--no-progress`: Do not show progress indicators
|
|
97
|
+
|
|
98
|
+
#### Command Options (update):
|
|
99
|
+
|
|
100
|
+
- `-t, --template <type>`: Template type (`cli`, `web-vanilla`, `web-app`, `web-fullstack`)
|
|
101
|
+
- `--description <description>`: Project description
|
|
102
|
+
- `-k, --keywords <keywords>`: Project keywords (comma separated)
|
|
103
|
+
- `-a, --author <author>`: Author name (defaults to 'git config user.name')
|
|
104
|
+
- `--github-username <username>`: GitHub username (defaults to 'git config github.user')
|
|
105
|
+
- `-p, --package-manager <pm>`: Package manager (`npm`, `pnpm`, `yarn`) (defaults to `pnpm`)
|
|
106
|
+
- `--create-github-repository`: Create GitHub project (requires `gh` CLI authenticated)
|
|
69
107
|
- `-d, --directory <path>`: Output directory (defaults to `.`)
|
|
70
|
-
- `--
|
|
71
|
-
- `--
|
|
72
|
-
- `--
|
|
108
|
+
- `--install-dependencies`: Install dependencies after updating
|
|
109
|
+
- `--build`: Run the CI script (lint, build, test) after updating
|
|
110
|
+
- `--dev`: Run the dev server after updating
|
|
111
|
+
- `--open`: Open the browser after updating
|
|
112
|
+
- `--no-progress`: Do not show progress indicators
|
|
73
113
|
|
|
74
114
|
## Project Templates
|
|
75
115
|
|
|
76
116
|
### 🟢 CLI
|
|
117
|
+
|
|
77
118
|
A clean Node.js CLI environment featuring `commander` and `cli-progress`. Supports optional Vite bundling.
|
|
78
119
|
|
|
79
120
|
### 🔵 Web-Vanilla
|
|
121
|
+
|
|
80
122
|
Standalone web page setup for modern browsers. Can be used with or without a build step.
|
|
81
123
|
|
|
82
124
|
### 🟡 Web-App
|
|
125
|
+
|
|
83
126
|
Modern React application featuring MUI components and TanStack Query for state management.
|
|
84
127
|
|
|
85
128
|
### ⚛️ Web-Fullstack
|
|
129
|
+
|
|
86
130
|
A full-stack monorepo featuring:
|
|
131
|
+
|
|
87
132
|
- **Client**: React with MUI (including Icons) and TypeScript.
|
|
88
133
|
- **Server**: Express.js backend with tRPC for end-to-end type safety.
|
|
89
134
|
- **E2E**: Playwright for end-to-end testing.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"dependencies": {
|
|
3
3
|
"vite": {
|
|
4
|
-
"version": "8.0.
|
|
4
|
+
"version": "8.0.2",
|
|
5
5
|
"description": "Native-ESM powered web dev build tool"
|
|
6
6
|
},
|
|
7
7
|
"@vitejs/plugin-react": {
|
|
@@ -9,11 +9,11 @@
|
|
|
9
9
|
"description": "The default Vite plugin for React projects."
|
|
10
10
|
},
|
|
11
11
|
"@vitest/browser": {
|
|
12
|
-
"version": "4.1.
|
|
12
|
+
"version": "4.1.1",
|
|
13
13
|
"description": "Run Vitest in the browser."
|
|
14
14
|
},
|
|
15
15
|
"@vitest/browser-playwright": {
|
|
16
|
-
"version": "4.1.
|
|
16
|
+
"version": "4.1.1",
|
|
17
17
|
"description": "Playwright provider for Vitest browser mode."
|
|
18
18
|
},
|
|
19
19
|
"playwright": {
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"description": "TypeScript definitions for Node.js."
|
|
42
42
|
},
|
|
43
43
|
"@vitest/coverage-v8": {
|
|
44
|
-
"version": "4.1.
|
|
44
|
+
"version": "4.1.1",
|
|
45
45
|
"description": "V8 coverage provider for Vitest."
|
|
46
46
|
},
|
|
47
47
|
"conventional-changelog": {
|
|
@@ -60,16 +60,16 @@
|
|
|
60
60
|
"version": "0.17.1",
|
|
61
61
|
"description": "TypeScript-specific rules for oxlint."
|
|
62
62
|
},
|
|
63
|
-
"
|
|
64
|
-
"version": "
|
|
65
|
-
"description": "
|
|
63
|
+
"oxfmt": {
|
|
64
|
+
"version": "0.41.0",
|
|
65
|
+
"description": "High performance JavaScript / TypeScript formatter."
|
|
66
66
|
},
|
|
67
67
|
"typescript": {
|
|
68
68
|
"version": "5.9.3",
|
|
69
69
|
"description": "A superset of JavaScript that compiles to clean JavaScript output."
|
|
70
70
|
},
|
|
71
71
|
"vitest": {
|
|
72
|
-
"version": "4.1.
|
|
72
|
+
"version": "4.1.1",
|
|
73
73
|
"description": "A Vite-native unit test framework."
|
|
74
74
|
},
|
|
75
75
|
"commander": {
|
|
@@ -129,19 +129,19 @@
|
|
|
129
129
|
"description": "End-to-end testing framework."
|
|
130
130
|
},
|
|
131
131
|
"@trpc/server": {
|
|
132
|
-
"version": "11.
|
|
132
|
+
"version": "11.15.0",
|
|
133
133
|
"description": "tRPC server library."
|
|
134
134
|
},
|
|
135
135
|
"@trpc/client": {
|
|
136
|
-
"version": "11.
|
|
136
|
+
"version": "11.15.0",
|
|
137
137
|
"description": "tRPC client library."
|
|
138
138
|
},
|
|
139
139
|
"@trpc/react-query": {
|
|
140
|
-
"version": "11.
|
|
140
|
+
"version": "11.15.0",
|
|
141
141
|
"description": "tRPC integration for React Query."
|
|
142
142
|
},
|
|
143
143
|
"@tanstack/react-query": {
|
|
144
|
-
"version": "5.
|
|
144
|
+
"version": "5.95.2",
|
|
145
145
|
"description": "Powerful asynchronous state management for TS/JS."
|
|
146
146
|
},
|
|
147
147
|
"zod": {
|
|
@@ -149,7 +149,7 @@
|
|
|
149
149
|
"description": "TypeScript-first schema validation with static type inference."
|
|
150
150
|
},
|
|
151
151
|
"react-router-dom": {
|
|
152
|
-
"version": "7.13.
|
|
152
|
+
"version": "7.13.2",
|
|
153
153
|
"description": "Declarative routing for React web applications."
|
|
154
154
|
},
|
|
155
155
|
"cors": {
|