create-krispya 0.4.3 → 0.4.5

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 ADDED
@@ -0,0 +1,97 @@
1
+ # create-krispya
2
+
3
+ A CLI for scaffolding modern web projects with sensible defaults.
4
+
5
+ ## Usage
6
+
7
+ ```bash
8
+ npm create krispya
9
+ # or
10
+ pnpm create krispya
11
+ # or
12
+ yarn create krispya
13
+ ```
14
+
15
+ ## Templates
16
+
17
+ | Template | Description |
18
+ | ------------ | --------------------------------- |
19
+ | `vanilla` | Vanilla TypeScript (default) |
20
+ | `vanilla-js` | Vanilla JavaScript |
21
+ | `react` | React with TypeScript |
22
+ | `react-js` | React with JavaScript |
23
+ | `r3f` | React Three Fiber with TypeScript |
24
+ | `r3f-js` | React Three Fiber with JavaScript |
25
+
26
+ ## Project Types
27
+
28
+ - **Application** (default): Web app with Vite for dev/bundling
29
+ - **Library**: Publishable npm package with ESM/CJS output, proper exports, and peer dependencies
30
+
31
+ ## Tooling Options
32
+
33
+ | Category | Options | Default |
34
+ | --------- | ------------------------------------ | --------- |
35
+ | Linter | `oxlint`, `eslint`, `biome` | `oxlint` |
36
+ | Formatter | `oxfmt`, `prettier`, `biome` | `oxfmt` |
37
+ | Bundler | `unbuild`, `tsdown` (libraries only) | `unbuild` |
38
+ | Testing | `vitest` | always |
39
+
40
+ ## CLI Options
41
+
42
+ ```
43
+ create-krispya [name] [options]
44
+
45
+ Options:
46
+ --type <type> app | library (default: app)
47
+ --template <type> vanilla | react | r3f (+ -js variants)
48
+ --linter <type> eslint | oxlint | biome
49
+ --formatter <type> prettier | oxfmt | biome
50
+ --bundler <bundler> unbuild | tsdown (libraries only)
51
+ --package-manager <pm> npm | yarn | pnpm
52
+ --node-version <version> Node.js version (default: latest)
53
+ --pnpm-manage-versions Enable pnpm version management (default: true)
54
+ -y, --yes Skip prompts, use defaults
55
+ ```
56
+
57
+ ### R3F Integrations
58
+
59
+ For `r3f`/`r3f-js` templates:
60
+
61
+ ```
62
+ --drei @react-three/drei helpers
63
+ --handle @react-three/handle events
64
+ --leva leva controls
65
+ --postprocessing @react-three/postprocessing effects
66
+ --rapier @react-three/rapier physics
67
+ --xr @react-three/xr VR/AR
68
+ --uikit @react-three/uikit UI
69
+ --offscreen @react-three/offscreen rendering
70
+ --zustand zustand state
71
+ --koota koota ECS
72
+ --triplex Triplex dev environment
73
+ --viverse Viverse deployment
74
+ ```
75
+
76
+ ## Examples
77
+
78
+ ```bash
79
+ # Interactive mode
80
+ npm create krispya
81
+
82
+ # React app with defaults
83
+ npm create krispya my-app --template react -y
84
+
85
+ # R3F with integrations
86
+ npm create krispya my-3d-app --template r3f --drei --rapier --leva
87
+
88
+ # Library with tsdown
89
+ npm create krispya my-lib --type library --template react --bundler tsdown
90
+
91
+ # Custom tooling
92
+ npm create krispya my-app --linter eslint --formatter prettier
93
+ ```
94
+
95
+ ## Post-Creation
96
+
97
+ After scaffolding, you'll be prompted to open the project in your editor (Cursor, VS Code, or WebStorm).
package/dist/cli.cjs CHANGED
@@ -383,10 +383,14 @@ async function promptForOptions(name) {
383
383
  }
384
384
  function openInEditor(editor, path) {
385
385
  return new Promise((resolve, reject) => {
386
- const child = child_process.spawn(editor, [path], {
386
+ const isWindows = process.platform === "win32";
387
+ const child = isWindows ? child_process.spawn(`${editor} "${path}"`, {
387
388
  detached: true,
388
389
  stdio: "ignore",
389
- shell: process.platform === "win32"
390
+ shell: true
391
+ }) : child_process.spawn(editor, [path], {
392
+ detached: true,
393
+ stdio: "ignore"
390
394
  });
391
395
  child.on("error", reject);
392
396
  child.unref();
package/dist/cli.mjs CHANGED
@@ -363,10 +363,14 @@ async function promptForOptions(name) {
363
363
  }
364
364
  function openInEditor(editor, path) {
365
365
  return new Promise((resolve, reject) => {
366
- const child = spawn(editor, [path], {
366
+ const isWindows = process.platform === "win32";
367
+ const child = isWindows ? spawn(`${editor} "${path}"`, {
367
368
  detached: true,
368
369
  stdio: "ignore",
369
- shell: process.platform === "win32"
370
+ shell: true
371
+ }) : spawn(editor, [path], {
372
+ detached: true,
373
+ stdio: "ignore"
370
374
  });
371
375
  child.on("error", reject);
372
376
  child.unref();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-krispya",
3
- "version": "0.4.3",
3
+ "version": "0.4.5",
4
4
  "description": "🌹 CLI for creating web projects with (my) sensible defaults",
5
5
  "keywords": [
6
6
  "cli",
@@ -14,7 +14,8 @@
14
14
  "author": "Kris Baumgartner",
15
15
  "bin": "dist/cli.mjs",
16
16
  "files": [
17
- "dist"
17
+ "dist",
18
+ "README.md"
18
19
  ],
19
20
  "type": "module",
20
21
  "main": "dist/index.mjs",