@buding0904/vitepad 0.3.0 → 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 CHANGED
@@ -7,7 +7,7 @@
7
7
  <a href="https://www.npmjs.com/package/@buding0904/vitepad"><img src="https://img.shields.io/npm/v/@buding0904/vitepad.svg" alt="npm version" /></a>
8
8
  <a href="./LICENSE"><img src="https://img.shields.io/npm/l/@buding0904/vitepad.svg" alt="license" /></a>
9
9
  <img src="https://img.shields.io/badge/frameworks-React%20%7C%20Preact%20%7C%20Solid%20%7C%20Vue%20%7C%20Svelte-blue" alt="frameworks" />
10
- <img src="https://img.shields.io/badge/Tailwind-v4-38bdf8" alt="Tailwind CSS" />
10
+ <img src="https://img.shields.io/badge/UnoCSS-enabled-22c55e" alt="UnoCSS" />
11
11
  </p>
12
12
  </div>
13
13
 
@@ -15,7 +15,7 @@
15
15
 
16
16
  `vitepad` creates a temporary Vite playground for one entry file. Use it to preview a component, test a small main entry, or compare the same file across different framework versions without creating a project or changing the current project's dependencies.
17
17
 
18
- Tailwind CSS is enabled by default. Framework packages are resolved to exact npm versions, downloaded on demand, and cached under `~/.cache/vitepad/frameworks`. No ESLint, Biome, Husky, or formatting pipeline is included.
18
+ UnoCSS is enabled by default. Framework packages are resolved to exact npm versions, downloaded on demand, and cached under `~/.cache/vitepad/frameworks`. No ESLint, Biome, Husky, or formatting pipeline is included.
19
19
 
20
20
  ## Features
21
21
 
@@ -38,11 +38,10 @@ Tailwind CSS is enabled by default. Framework packages are resolved to exact npm
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
 
45
- - Tailwind CSS v4 is available by default through `@tailwindcss/vite`
44
+ - UnoCSS is available by default through `unocss/vite` with `presetUno`
46
45
  - Framework dependencies are exposed through the temporary Vite workspace
47
46
  - Missing framework packages are linked into local `node_modules` for editor type resolution
48
47
  - Existing local packages are left untouched, and `package.json` is not modified
@@ -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 --no-open
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 --force-install
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 creates lightweight symlinks for missing framework packages inside the entry file directory's `node_modules`.
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