mirror of
https://github.com/nestriness/nestri.git
synced 2026-11-03 22:22:39 +02:00
bun --watch watches each imported file, and many editors save by writing a new file and renaming it over the old one. The watch does not follow the rename, so the first such save reloaded the preview and every later one was silently ignored. The preview now runs under a small supervisor that watches the source directories and restarts the server, which sees a save however it was made. It also stops the server when it is stopped itself, so the port is not left held.
24 lines
491 B
JSON
24 lines
491 B
JSON
{
|
|
"name": "auth",
|
|
"type": "module",
|
|
"scripts": {
|
|
"dev": "wrangler dev",
|
|
"serve": "bun run src/server.ts",
|
|
"preview": "bun script/preview-watch.ts",
|
|
"deploy": "wrangler deploy"
|
|
},
|
|
"dependencies": {
|
|
"@nestri/auth": "workspace:",
|
|
"@nestri/core": "workspace:"
|
|
},
|
|
"devDependencies": {
|
|
"@cloudflare/workers-types": "catalog:",
|
|
"@tsconfig/node22": "catalog:",
|
|
"@types/bun": "catalog:",
|
|
"@types/node": "catalog:"
|
|
},
|
|
"peerDependencies": {
|
|
"typescript": "catalog:"
|
|
}
|
|
}
|