@buding0904/vitepad 0.3.1 → 0.3.2
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 +4 -6
- package/dist/cli-runtime.cjs +818 -0
- package/dist/cli-runtime.cjs.map +1 -0
- package/dist/cli-runtime.d.ts +3 -0
- package/dist/cli-runtime.d.ts.map +1 -0
- package/dist/cli-runtime.js +807 -0
- package/dist/cli-runtime.js.map +1 -0
- package/dist/cli.cjs +33 -765
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.js +32 -761
- package/dist/cli.js.map +1 -1
- package/dist/index.cjs +104 -72
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +102 -70
- package/dist/index.js.map +1 -1
- package/dist/runtime/index.d.ts +2 -2
- package/dist/runtime/index.d.ts.map +1 -1
- package/dist/version.d.ts +2 -0
- package/dist/version.d.ts.map +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -38,7 +38,6 @@ UnoCSS is enabled by default. Framework packages are resolved to exact npm versi
|
|
|
38
38
|
- Test the same component against different framework versions without touching `package.json`
|
|
39
39
|
- `latest` and semver ranges are resolved to exact versions before caching
|
|
40
40
|
- Cache keys use exact versions, for example `react-19.2.6`
|
|
41
|
-
- `--force-install` recreates the selected framework cache
|
|
42
41
|
|
|
43
42
|
**Styling and environment**
|
|
44
43
|
|
|
@@ -110,10 +109,9 @@ vitepad <entry> [options]
|
|
|
110
109
|
|--------|-------------|
|
|
111
110
|
| `<entry>` | Entry file to run |
|
|
112
111
|
| `-f, --framework <name>` | `auto`, `react`, `preact`, `solid`, `vue`, `svelte`, or `vanilla`; version specs are supported, e.g. `react@18` |
|
|
113
|
-
| `--force-install` | Reinstall the selected framework cache |
|
|
114
112
|
| `-p, --port <number>` | Dev server port (default: `8000`) |
|
|
113
|
+
| `--strictPort` | Exit if the configured port is already in use |
|
|
115
114
|
| `--host <host>` | Dev server host (default: `0.0.0.0`) |
|
|
116
|
-
| `--no-open` | Do not open the browser automatically |
|
|
117
115
|
| `-c, --config <file>` | Merge an extra Vite config file |
|
|
118
116
|
| `-h, --help` | Show help |
|
|
119
117
|
|
|
@@ -121,14 +119,14 @@ Examples:
|
|
|
121
119
|
|
|
122
120
|
```bash
|
|
123
121
|
vitepad ./App.tsx --framework react@18 --port 3000
|
|
124
|
-
vitepad ./App.vue --host 127.0.0.1
|
|
122
|
+
vitepad ./App.vue --host 127.0.0.1
|
|
125
123
|
vitepad ./App.svelte --config ./vite.extra.js
|
|
126
|
-
vitepad ./App.tsx --framework react@latest
|
|
124
|
+
vitepad ./App.tsx --framework react@latest
|
|
127
125
|
```
|
|
128
126
|
|
|
129
127
|
## Editor Types
|
|
130
128
|
|
|
131
|
-
VSCode's TypeScript server resolves imports and JSX types from the opened file's directory tree, not from vitepad's temporary Vite workspace. To keep editor diagnostics aligned with the file you run, vitepad
|
|
129
|
+
VSCode's TypeScript server resolves imports and JSX types from the opened file's directory tree, not from vitepad's temporary Vite workspace. To keep editor diagnostics aligned with the file you run, vitepad looks from the entry file directory up through its parent directories for framework packages before linking anything. If a package cannot be resolved from that directory tree, vitepad creates a lightweight symlink inside the entry file directory's `node_modules`.
|
|
132
130
|
|
|
133
131
|
For React, vitepad links `react`, `react-dom`, `@types/react`, and `@types/react-dom` when they are missing. Existing packages are left untouched, so a project that already has React installed keeps using its local version for editor types. Runtime dependencies still come from vitepad's cache, and vitepad does not write to `package.json`.
|
|
134
132
|
|