create-krispya 0.4.8 → 0.5.1
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 +89 -30
- package/dist/chunks/index.cjs +2360 -0
- package/dist/chunks/index.mjs +2346 -0
- package/dist/cli.cjs +816 -195
- package/dist/cli.mjs +818 -197
- package/dist/index.cjs +10 -1714
- package/dist/index.d.cts +84 -79
- package/dist/index.d.mts +84 -79
- package/dist/index.d.ts +84 -79
- package/dist/index.mjs +2 -1707
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,17 +1,33 @@
|
|
|
1
1
|
# create-krispya
|
|
2
2
|
|
|
3
|
-
A CLI for scaffolding modern web projects with sensible defaults.
|
|
3
|
+
A CLI for scaffolding modern web projects and monorepos with sensible defaults.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Quick Start
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
|
-
npm create krispya
|
|
9
|
-
# or
|
|
10
8
|
pnpm create krispya
|
|
11
9
|
# or
|
|
10
|
+
npm create krispya
|
|
11
|
+
# or
|
|
12
12
|
yarn create krispya
|
|
13
13
|
```
|
|
14
14
|
|
|
15
|
+
## Features
|
|
16
|
+
|
|
17
|
+
- **Monorepo support** — Generate pnpm workspaces with shared configs
|
|
18
|
+
- **Modern tooling** — Oxlint, Oxfmt, Vite, Vitest out of the box
|
|
19
|
+
- **TypeScript first** — Full type safety with JavaScript fallback
|
|
20
|
+
- **Library ready** — ESM/CJS dual output with proper exports
|
|
21
|
+
- **React & R3F** — First-class support with optional integrations
|
|
22
|
+
|
|
23
|
+
## Project Types
|
|
24
|
+
|
|
25
|
+
| Type | Description |
|
|
26
|
+
| ----------- | -------------------------------------------------------- |
|
|
27
|
+
| Application | Web app with Vite dev server and bundling |
|
|
28
|
+
| Library | Publishable npm package with ESM/CJS output |
|
|
29
|
+
| Monorepo | pnpm workspace with shared configs and multiple packages |
|
|
30
|
+
|
|
15
31
|
## Templates
|
|
16
32
|
|
|
17
33
|
| Template | Description |
|
|
@@ -23,19 +39,54 @@ yarn create krispya
|
|
|
23
39
|
| `r3f` | React Three Fiber with TypeScript |
|
|
24
40
|
| `r3f-js` | React Three Fiber with JavaScript |
|
|
25
41
|
|
|
26
|
-
##
|
|
42
|
+
## Monorepo
|
|
43
|
+
|
|
44
|
+
Generate a monorepo with shared configuration packages:
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
pnpm create krispya my-workspace --monorepo
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
This creates:
|
|
27
51
|
|
|
28
|
-
|
|
29
|
-
-
|
|
52
|
+
```
|
|
53
|
+
my-workspace/
|
|
54
|
+
├── .config/
|
|
55
|
+
│ ├── typescript/ # @config/typescript - shared tsconfigs
|
|
56
|
+
│ ├── oxlint/ # @config/oxlint - shared lint rules
|
|
57
|
+
│ └── oxfmt/ # @config/oxfmt - shared format rules
|
|
58
|
+
├── apps/ # Application packages
|
|
59
|
+
├── packages/ # Library packages
|
|
60
|
+
├── package.json
|
|
61
|
+
└── pnpm-workspace.yaml
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
### Adding Packages
|
|
65
|
+
|
|
66
|
+
Run the CLI from within a monorepo to add new packages:
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
cd my-workspace
|
|
70
|
+
pnpm create krispya
|
|
71
|
+
# Select "Add new package to this workspace"
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
Sub-packages automatically:
|
|
75
|
+
|
|
76
|
+
- Extend shared configs via `@config/*` workspace dependencies
|
|
77
|
+
- Skip redundant files (`.gitignore`, `.vscode/`, etc.)
|
|
78
|
+
- Use root-level dev tools (oxlint, oxfmt)
|
|
30
79
|
|
|
31
80
|
## Tooling Options
|
|
32
81
|
|
|
33
|
-
| Category | Options
|
|
34
|
-
| --------- |
|
|
35
|
-
| Linter | `oxlint`, `eslint`, `biome`
|
|
36
|
-
| Formatter | `oxfmt`, `prettier`, `biome`
|
|
37
|
-
| Bundler | `unbuild`, `tsdown`
|
|
38
|
-
| Testing | `vitest`
|
|
82
|
+
| Category | Options | Default |
|
|
83
|
+
| --------- | ---------------------------- | --------- |
|
|
84
|
+
| Linter | `oxlint`, `eslint`, `biome` | `oxlint` |
|
|
85
|
+
| Formatter | `oxfmt`, `prettier`, `biome` | `oxfmt` |
|
|
86
|
+
| Bundler | `unbuild`, `tsdown` | `unbuild` |
|
|
87
|
+
| Testing | `vitest`, `none` | varies\* |
|
|
88
|
+
|
|
89
|
+
\*Testing defaults to `vitest` for libraries, `none` for applications (configurable via prompts).
|
|
39
90
|
|
|
40
91
|
## CLI Options
|
|
41
92
|
|
|
@@ -45,6 +96,7 @@ create-krispya [name] [options]
|
|
|
45
96
|
Options:
|
|
46
97
|
--type <type> app | library (default: app)
|
|
47
98
|
--template <type> vanilla | react | r3f (+ -js variants)
|
|
99
|
+
--monorepo Create a pnpm monorepo workspace
|
|
48
100
|
--linter <type> eslint | oxlint | biome
|
|
49
101
|
--formatter <type> prettier | oxfmt | biome
|
|
50
102
|
--bundler <bundler> unbuild | tsdown (libraries only)
|
|
@@ -59,39 +111,46 @@ Options:
|
|
|
59
111
|
For `r3f`/`r3f-js` templates:
|
|
60
112
|
|
|
61
113
|
```
|
|
62
|
-
--drei
|
|
63
|
-
--handle
|
|
64
|
-
--leva
|
|
114
|
+
--drei @react-three/drei helpers
|
|
115
|
+
--handle @react-three/handle events
|
|
116
|
+
--leva leva controls
|
|
65
117
|
--postprocessing @react-three/postprocessing effects
|
|
66
|
-
--rapier
|
|
67
|
-
--xr
|
|
68
|
-
--uikit
|
|
69
|
-
--offscreen
|
|
70
|
-
--zustand
|
|
71
|
-
--koota
|
|
72
|
-
--triplex
|
|
73
|
-
--viverse
|
|
118
|
+
--rapier @react-three/rapier physics
|
|
119
|
+
--xr @react-three/xr VR/AR
|
|
120
|
+
--uikit @react-three/uikit UI
|
|
121
|
+
--offscreen @react-three/offscreen rendering
|
|
122
|
+
--zustand zustand state
|
|
123
|
+
--koota koota ECS
|
|
124
|
+
--triplex Triplex dev environment
|
|
125
|
+
--viverse Viverse deployment
|
|
74
126
|
```
|
|
75
127
|
|
|
76
128
|
## Examples
|
|
77
129
|
|
|
78
130
|
```bash
|
|
79
131
|
# Interactive mode
|
|
80
|
-
|
|
132
|
+
pnpm create krispya
|
|
81
133
|
|
|
82
134
|
# React app with defaults
|
|
83
|
-
|
|
135
|
+
pnpm create krispya my-app --template react -y
|
|
136
|
+
|
|
137
|
+
# Monorepo workspace
|
|
138
|
+
pnpm create krispya my-workspace --monorepo
|
|
84
139
|
|
|
85
140
|
# R3F with integrations
|
|
86
|
-
|
|
141
|
+
pnpm create krispya my-3d-app --template r3f --drei --rapier --leva
|
|
87
142
|
|
|
88
143
|
# Library with tsdown
|
|
89
|
-
|
|
144
|
+
pnpm create krispya my-lib --type library --template react --bundler tsdown
|
|
90
145
|
|
|
91
146
|
# Custom tooling
|
|
92
|
-
|
|
147
|
+
pnpm create krispya my-app --linter eslint --formatter prettier
|
|
93
148
|
```
|
|
94
149
|
|
|
95
150
|
## Post-Creation
|
|
96
151
|
|
|
97
|
-
After scaffolding
|
|
152
|
+
After scaffolding:
|
|
153
|
+
|
|
154
|
+
1. Install dependencies: `pnpm install`
|
|
155
|
+
2. Start development: `pnpm dev`
|
|
156
|
+
3. Optionally open in your editor (Cursor, VS Code, or WebStorm)
|