create-template-project 1.5.24 → 1.6.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 +39 -5
- package/dist/config/dependencies.json +21 -1
- package/dist/index.js +733 -142
- package/dist/templates/base/files/README.md +1 -1
- package/dist/templates/base/files/_oxc.config.ts +17 -35
- package/dist/templates/web-widget/files/.github/workflows/pages.yml +36 -0
- package/dist/templates/web-widget/files/index.html +21 -0
- package/dist/templates/web-widget/files/package.json +53 -0
- package/dist/templates/web-widget/files/playwright.config.ts +29 -0
- package/dist/templates/web-widget/files/scripts/screenshot.mjs +35 -0
- package/dist/templates/web-widget/files/src/demo/app.ts +22 -0
- package/dist/templates/web-widget/files/src/demo/demo-shell.css +50 -0
- package/dist/templates/web-widget/files/src/lib/index.ts +2 -0
- package/dist/templates/web-widget/files/src/lib/react.tsx +54 -0
- package/dist/templates/web-widget/files/src/lib/test-setup.ts +7 -0
- package/dist/templates/web-widget/files/src/lib/widget.test.ts +33 -0
- package/dist/templates/web-widget/files/src/lib/widget.ts +83 -0
- package/dist/templates/web-widget/files/src/styles/index.css +42 -0
- package/dist/templates/web-widget/files/stylelint.base.config.js +16 -0
- package/dist/templates/web-widget/files/stylelint.config.js +15 -0
- package/dist/templates/web-widget/files/tests/e2e/widget.e2e-test.ts +16 -0
- package/dist/templates/web-widget/files/tsdown.config.ts +20 -0
- package/dist/templates/web-widget/files/typedoc.json +12 -0
- package/dist/templates/web-widget/files/vite.config.ts +37 -0
- package/package.json +6 -4
- /package/dist/templates/base/files/.github/workflows/{node.js.yml → ci.yml} +0 -0
package/README.md
CHANGED
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
[](https://www.npmjs.com/package/create-template-project)
|
|
4
4
|
[](https://www.npmjs.com/package/create-template-project)
|
|
5
5
|
[](https://opensource.org/licenses/MIT)
|
|
6
|
-
[](https://github.com/doberkofler/create-template-project/actions/workflows/ci.yml)
|
|
7
7
|
[](https://coveralls.io/github/doberkofler/create-template-project?branch=main)
|
|
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
|
+
An ultra-modular, type-safe Node.js CLI tool used to scaffold new project templates (CLI, Web-Vanilla, Web-Widget, Web-App, Web-Fullstack) with best-practice configurations pre-installed.
|
|
10
10
|
|
|
11
11
|
## 🚀 Quick Start
|
|
12
12
|
|
|
@@ -61,7 +61,7 @@ Running the tool without any command will display the help message.
|
|
|
61
61
|
|
|
62
62
|
### CLI Commands
|
|
63
63
|
|
|
64
|
-
You can skip the wizard by using the `create` or `update` commands with the appropriate options.
|
|
64
|
+
You can skip the wizard by using the `create`, `doctor`, `adopt`, or `update` commands with the appropriate options.
|
|
65
65
|
|
|
66
66
|
#### Create a new project
|
|
67
67
|
|
|
@@ -75,6 +75,30 @@ create-template-project create --template cli --name my-cool-tool --path ./my-co
|
|
|
75
75
|
create-template-project update --template cli
|
|
76
76
|
```
|
|
77
77
|
|
|
78
|
+
`update` requires a `create-template-project` marker in `package.json` so the tool knows which template owns the project:
|
|
79
|
+
|
|
80
|
+
```json
|
|
81
|
+
{
|
|
82
|
+
"create-template-project": {
|
|
83
|
+
"template": "web-app"
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
If a project has a compatible structure but was not originally created by this tool, validate it first:
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
create-template-project doctor --template web-app --directory .
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
If the compatibility check passes, adopt the project to add the marker:
|
|
95
|
+
|
|
96
|
+
```bash
|
|
97
|
+
create-template-project adopt --template web-app --directory .
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
After adoption, `update` can safely run against the project. `doctor` is read-only; `adopt` only writes the `create-template-project` marker after validation and confirmation.
|
|
101
|
+
|
|
78
102
|
#### Global Options:
|
|
79
103
|
|
|
80
104
|
- `--debug`: Enable debug output
|
|
@@ -83,7 +107,7 @@ create-template-project update --template cli
|
|
|
83
107
|
|
|
84
108
|
#### Command Options (create):
|
|
85
109
|
|
|
86
|
-
- `-t, --template <type>`: Template type (`cli`, `web-vanilla`, `web-app`, `web-fullstack`)
|
|
110
|
+
- `-t, --template <type>`: Template type (`cli`, `web-vanilla`, `web-widget`, `web-app`, `web-fullstack`)
|
|
87
111
|
- `-n, --name <name>`: Project name
|
|
88
112
|
- `--description <description>`: Project description
|
|
89
113
|
- `-k, --keywords <keywords>`: Project keywords (comma separated)
|
|
@@ -97,7 +121,7 @@ create-template-project update --template cli
|
|
|
97
121
|
|
|
98
122
|
#### Command Options (update):
|
|
99
123
|
|
|
100
|
-
- `-t, --template <type>`: Template type (`cli`, `web-vanilla`, `web-app`, `web-fullstack`)
|
|
124
|
+
- `-t, --template <type>`: Template type (`cli`, `web-vanilla`, `web-widget`, `web-app`, `web-fullstack`)
|
|
101
125
|
- `--description <description>`: Project description
|
|
102
126
|
- `-k, --keywords <keywords>`: Project keywords (comma separated)
|
|
103
127
|
- `-a, --author <author>`: Author name (defaults to 'git config user.name')
|
|
@@ -110,6 +134,12 @@ create-template-project update --template cli
|
|
|
110
134
|
- `--open`: Open the browser after updating
|
|
111
135
|
- `--no-progress`: Do not show progress indicators
|
|
112
136
|
|
|
137
|
+
#### Command Options (doctor/adopt):
|
|
138
|
+
|
|
139
|
+
- `-t, --template <type>`: Template type (`cli`, `web-vanilla`, `web-widget`, `web-app`, `web-fullstack`)
|
|
140
|
+
- `-d, --directory <path>`: Project directory (defaults to `.`)
|
|
141
|
+
- `--yes`: Adopt without confirmation (`adopt` only)
|
|
142
|
+
|
|
113
143
|
## Project Templates
|
|
114
144
|
|
|
115
145
|
### 🟢 CLI
|
|
@@ -120,6 +150,10 @@ A clean Node.js CLI environment featuring `commander` and `cli-progress`. Suppor
|
|
|
120
150
|
|
|
121
151
|
Standalone web page setup for modern browsers. Can be used with or without a build step.
|
|
122
152
|
|
|
153
|
+
### 🟣 Web-Widget
|
|
154
|
+
|
|
155
|
+
Publishable native TypeScript widget package with `tsdown` library builds, Vite demo output, TypeDoc API docs, Stylelint CSS checks, Playwright e2e tests, screenshot generation, npm exports, and an optional React adapter subpath.
|
|
156
|
+
|
|
123
157
|
### 🟡 Web-App
|
|
124
158
|
|
|
125
159
|
Modern React application featuring MUI components and TanStack Query for state management.
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
"description": "High performance JavaScript / TypeScript formatter."
|
|
70
70
|
},
|
|
71
71
|
"typescript": {
|
|
72
|
-
"version": "
|
|
72
|
+
"version": "6.0.3",
|
|
73
73
|
"description": "A superset of JavaScript that compiles to clean JavaScript output."
|
|
74
74
|
},
|
|
75
75
|
"vitest": {
|
|
@@ -175,6 +175,26 @@
|
|
|
175
175
|
"vitest-browser-react": {
|
|
176
176
|
"version": "2.2.0",
|
|
177
177
|
"description": "Native React testing utilities for Vitest browser mode."
|
|
178
|
+
},
|
|
179
|
+
"tsdown": {
|
|
180
|
+
"version": "0.22.14",
|
|
181
|
+
"description": "Modern TypeScript library bundler powered by Rolldown."
|
|
182
|
+
},
|
|
183
|
+
"@tsdown/css": {
|
|
184
|
+
"version": "0.22.14",
|
|
185
|
+
"description": "CSS support plugin for tsdown."
|
|
186
|
+
},
|
|
187
|
+
"typedoc": {
|
|
188
|
+
"version": "0.28.20",
|
|
189
|
+
"description": "Documentation generator for TypeScript projects."
|
|
190
|
+
},
|
|
191
|
+
"stylelint": {
|
|
192
|
+
"version": "17.14.1",
|
|
193
|
+
"description": "A mighty CSS linter that helps avoid errors and enforce conventions."
|
|
194
|
+
},
|
|
195
|
+
"stylelint-config-standard": {
|
|
196
|
+
"version": "40.0.0",
|
|
197
|
+
"description": "Standard shareable config for stylelint."
|
|
178
198
|
}
|
|
179
199
|
}
|
|
180
200
|
}
|