@olegkuibar/plunk 0.7.5 → 0.7.6
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 +27 -7
- package/dist/cli.mjs +1 -1
- package/dist/vite-plugin.mjs +2 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -22,7 +22,7 @@ Local npm package development without symlinks. Copies built files directly into
|
|
|
22
22
|
```bash
|
|
23
23
|
npx plunk init # set up your app
|
|
24
24
|
plunk add my-lib # link a package
|
|
25
|
-
plunk
|
|
25
|
+
plunk dev # watch → build → push (continuous)
|
|
26
26
|
```
|
|
27
27
|
|
|
28
28
|
## Why plunk?
|
|
@@ -48,7 +48,7 @@ graph LR
|
|
|
48
48
|
1. `publish` copies built files to a local store at `~/.plunk/store/`
|
|
49
49
|
2. `add` copies from store into your app's `node_modules/`
|
|
50
50
|
3. `push` = publish + copy to all consumers
|
|
51
|
-
4.
|
|
51
|
+
4. `dev` = watch → build → push loop (or `push --watch`)
|
|
52
52
|
|
|
53
53
|
> Uses CoW reflinks for instant copy-on-write on APFS/btrfs/ReFS, with automatic fallback. Reflink support is probed once per volume and cached — no wasted syscalls. Only changed files are re-copied (xxhash-based diffing).
|
|
54
54
|
|
|
@@ -68,9 +68,9 @@ plunk publish
|
|
|
68
68
|
cd my-app
|
|
69
69
|
plunk add my-lib
|
|
70
70
|
|
|
71
|
-
# Continuous dev: watch → build → push
|
|
71
|
+
# Continuous dev: watch → build → push (auto-detects build command)
|
|
72
72
|
cd my-lib
|
|
73
|
-
plunk
|
|
73
|
+
plunk dev
|
|
74
74
|
```
|
|
75
75
|
|
|
76
76
|
## At a glance
|
|
@@ -97,9 +97,7 @@ npx @olegkuibar/plunk init # set up a consumer project
|
|
|
97
97
|
|
|
98
98
|
## Try it online
|
|
99
99
|
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
**[Open Playground](https://plunk-playground.vercel.app)** — Run real `plunk publish`, `plunk add`, and `plunk push` commands with live HMR preview.
|
|
100
|
+
**[Open Playground](https://plunk.olegkuibar.dev)** — run `plunk publish`, `plunk add`, and `plunk push` in the browser with live HMR preview.
|
|
103
101
|
|
|
104
102
|
## Documentation
|
|
105
103
|
|
|
@@ -121,6 +119,28 @@ Experience plunk directly in your browser with our interactive playground:
|
|
|
121
119
|
| [Playground](playground/) | Interactive browser-based playground |
|
|
122
120
|
| [Contributing](CONTRIBUTING.md) | Dev setup and guidelines |
|
|
123
121
|
|
|
122
|
+
## Acknowledgments
|
|
123
|
+
|
|
124
|
+
plunk and its playground are built on top of excellent open-source projects:
|
|
125
|
+
|
|
126
|
+
- [chokidar](https://github.com/paulmillr/chokidar) — file watching
|
|
127
|
+
- [xxhash-wasm](https://github.com/nicolo-ribaudo/xxhash-wasm-legacy) — fast file hashing for incremental sync
|
|
128
|
+
- [citty](https://github.com/unjs/citty) — CLI framework
|
|
129
|
+
- [tsup](https://github.com/egoist/tsup) — TypeScript bundler
|
|
130
|
+
- [vitest](https://github.com/vitest-dev/vitest) — test runner
|
|
131
|
+
- [WebContainers](https://webcontainers.io) — in-browser Node.js runtime (playground)
|
|
132
|
+
- [Vite](https://vite.dev) — frontend tooling
|
|
133
|
+
- [React](https://react.dev) — UI framework
|
|
134
|
+
- [Monaco Editor](https://microsoft.github.io/monaco-editor/) — code editor (playground)
|
|
135
|
+
- [xterm.js](https://xtermjs.org) — terminal emulator (playground)
|
|
136
|
+
- [Tailwind CSS](https://tailwindcss.com) — styling
|
|
137
|
+
|
|
138
|
+
Thank you to the maintainers and contributors of these projects.
|
|
139
|
+
|
|
140
|
+
<p>
|
|
141
|
+
<a href="https://tailwindcss.com"><img src="https://img.shields.io/badge/Support-Tailwind_CSS-06B6D4?style=for-the-badge&logo=tailwindcss&logoColor=white" alt="Support Tailwind CSS" /></a>
|
|
142
|
+
</p>
|
|
143
|
+
|
|
124
144
|
## License
|
|
125
145
|
|
|
126
146
|
[MIT](LICENSE)
|
package/dist/cli.mjs
CHANGED
|
@@ -8,4 +8,4 @@ var o=c(a$1(),1);var r=`
|
|
|
8
8
|
\u2588\u2588\u2551 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u255A\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D\u2588\u2588\u2551 \u255A\u2588\u2588\u2588\u2588\u2551\u2588\u2588\u2551 \u2588\u2588\u2557
|
|
9
9
|
\u255A\u2550\u255D \u255A\u2550\u2550\u2550\u2550\u2550\u2550\u255D \u255A\u2550\u2550\u2550\u2550\u2550\u255D \u255A\u2550\u255D \u255A\u2550\u2550\u2550\u255D\u255A\u2550\u255D \u255A\u2550\u255D
|
|
10
10
|
`;function a(){console.log(o.default.yellow(r)),console.log(o.default.cyan(" \u{1F4E6} Local npm package development without symlinks")),console.log(o.default.dim(` Copies built files into consumer node_modules with incremental sync
|
|
11
|
-
`));}a$2(a,"showBanner");process.env.UV_THREADPOOL_SIZE??=String(Math.max(availableParallelism(),8));a$3();var d=process.argv.slice(2),p=d.some(e=>!e.startsWith("-")&&["init","publish","add","remove","push","dev","restore","list","status","update","clean","gc","doctor","migrate"].includes(e));p||a();var u={meta:{name:"plunk",version:"0.7.
|
|
11
|
+
`));}a$2(a,"showBanner");process.env.UV_THREADPOOL_SIZE??=String(Math.max(availableParallelism(),8));a$3();var d=process.argv.slice(2),p=d.some(e=>!e.startsWith("-")&&["init","publish","add","remove","push","dev","restore","list","status","update","clean","gc","doctor","migrate"].includes(e));p||a();var u={meta:{name:"plunk",version:"0.7.6",description:"Local npm package development \u2014 copies built files into consumer node_modules"},args:{verbose:{type:"boolean",alias:"v",description:"Enable verbose debug logging",default:false},"dry-run":{type:"boolean",description:"Preview changes without writing files",default:false},json:{type:"boolean",description:"Output machine-readable JSON",default:false}},subCommands:{init:a$2(()=>import('./init-C6XCSFCU.mjs').then(e=>e.default),"init"),publish:a$2(()=>import('./publish-6A7PX5IH.mjs').then(e=>e.default),"publish"),add:a$2(()=>import('./add-GYBX4VAZ.mjs').then(e=>e.default),"add"),remove:a$2(()=>import('./remove-5DAQD627.mjs').then(e=>e.default),"remove"),push:a$2(()=>import('./push-AUAGCBYK.mjs').then(e=>e.default),"push"),dev:a$2(()=>import('./dev-DBGYZOIV.mjs').then(e=>e.default),"dev"),restore:a$2(()=>import('./restore-JVH6INAG.mjs').then(e=>e.default),"restore"),list:a$2(()=>import('./list-QSPN7FE5.mjs').then(e=>e.default),"list"),status:a$2(()=>import('./status-22YV26A3.mjs').then(e=>e.default),"status"),update:a$2(()=>import('./update-33ICRFYZ.mjs').then(e=>e.default),"update"),clean:a$2(()=>import('./clean-F2IWAVRP.mjs').then(e=>e.default),"clean"),gc:a$2(()=>import('./clean-F2IWAVRP.mjs').then(e=>e.default),"gc"),doctor:a$2(()=>import('./doctor-GJGAAT6J.mjs').then(e=>e.default),"doctor"),migrate:a$2(()=>import('./migrate-4TFDXO4G.mjs').then(e=>e.default),"migrate")}};a$4(u);
|
package/dist/vite-plugin.mjs
CHANGED
|
@@ -90,10 +90,6 @@ function plunkPlugin() {
|
|
|
90
90
|
isRestarting = true;
|
|
91
91
|
syncPackageWatchers();
|
|
92
92
|
console.log(`[plunk] ${source}, restarting server...`);
|
|
93
|
-
server.config.logger.info(
|
|
94
|
-
`[plunk] ${source}, restarting server...`,
|
|
95
|
-
{ timestamp: true }
|
|
96
|
-
);
|
|
97
93
|
try {
|
|
98
94
|
await server.restart();
|
|
99
95
|
} finally {
|
|
@@ -148,6 +144,8 @@ function plunkPlugin() {
|
|
|
148
144
|
const hasNew = currentPackages.some((pkg) => !watchedPackages.has(pkg));
|
|
149
145
|
if (hasNew) {
|
|
150
146
|
scheduleRestart("New package linked");
|
|
147
|
+
} else {
|
|
148
|
+
invalidateLinkedModules();
|
|
151
149
|
}
|
|
152
150
|
return;
|
|
153
151
|
}
|
package/package.json
CHANGED