@matthesketh/utopia-cli 0.5.0 → 0.7.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.
Files changed (2) hide show
  1. package/README.md +47 -0
  2. package/package.json +3 -3
package/README.md ADDED
@@ -0,0 +1,47 @@
1
+ # @matthesketh/utopia-cli
2
+
3
+ CLI for the UtopiaJS framework. Wraps Vite and auto-injects the UtopiaJS plugin when no `vite.config` exists.
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ pnpm add -D @matthesketh/utopia-cli
9
+ ```
10
+
11
+ Or scaffold a new project (includes the CLI automatically):
12
+
13
+ ```bash
14
+ npx create-utopia my-app
15
+ ```
16
+
17
+ ## Commands
18
+
19
+ ```bash
20
+ utopia dev # Start development server
21
+ utopia build # Build for production
22
+ utopia preview # Preview production build
23
+ utopia test # Run component tests (vitest + <test> block extraction)
24
+ utopia create # Prints instructions for npx create-utopia
25
+ ```
26
+
27
+ ## Options
28
+
29
+ | Flag | Description |
30
+ |------|-------------|
31
+ | `--port <port>` | Specify port (dev/preview) |
32
+ | `--host [host]` | Expose to network |
33
+ | `--open` | Open browser on startup |
34
+ | `--outDir <dir>` | Output directory (build) |
35
+ | `-c, --config <file>` | Use a specific Vite config file |
36
+ | `-h, --help` | Show help |
37
+ | `-v, --version` | Show version |
38
+
39
+ ## How It Works
40
+
41
+ - If no `vite.config.{ts,js,mjs,mts}` exists, the CLI auto-injects `@matthesketh/utopia-vite-plugin`
42
+ - `utopia test` auto-injects the `utopiaTestPlugin` from `@matthesketh/utopia-test/plugin`, which extracts `<test>` blocks from `.utopia` files into vitest-discoverable companion files
43
+ - All commands pass through to Vite under the hood
44
+
45
+ ## License
46
+
47
+ MIT
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@matthesketh/utopia-cli",
3
- "version": "0.5.0",
3
+ "version": "0.7.0",
4
4
  "description": "CLI for the UtopiaJS framework",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -31,8 +31,8 @@
31
31
  "dist"
32
32
  ],
33
33
  "dependencies": {
34
- "@matthesketh/utopia-vite-plugin": "0.5.0",
35
- "@matthesketh/utopia-test": "0.5.0"
34
+ "@matthesketh/utopia-test": "0.7.0",
35
+ "@matthesketh/utopia-vite-plugin": "0.7.0"
36
36
  },
37
37
  "peerDependencies": {
38
38
  "vite": "^6.0.0 || ^7.0.0",