mirror of
https://github.com/binaricat/Netcatty.git
synced 2026-11-09 15:52:14 +00:00
Use cross-platform Node script for clean:vite on Windows.
Replace rm -rf with fs.rmSync so dev:clean works under npm on Windows. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
98f260b047
commit
9a81b11317
2 files changed
+13
-1
No files matched your search
+1
-1
@@ -17,7 +17,7 @@
|
||||
"scripts": {
|
||||
"dev": "npm run fetch:mosh:dev && npm run fetch:et:dev && npm run lint && concurrently -k \"vite --strictPort\" \"npm:dev:electron\"",
|
||||
"dev:electron": "wait-on http-get://localhost:5173 && cross-env VITE_DEV_SERVER_URL=http://localhost:5173 node electron/launch.cjs",
|
||||
"clean:vite": "rm -rf node_modules/.vite",
|
||||
"clean:vite": "node scripts/clean-vite-cache.cjs",
|
||||
"dev:clean": "npm run clean:vite && npm run dev",
|
||||
"prebuild": "node scripts/copy-monaco.cjs",
|
||||
"fetch:mosh": "node scripts/fetch-mosh-binaries.cjs",
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
|
||||
const cacheDir = path.join(__dirname, '..', 'node_modules', '.vite');
|
||||
|
||||
if (!fs.existsSync(cacheDir)) {
|
||||
console.log('[clean-vite] No Vite cache to remove');
|
||||
process.exit(0);
|
||||
}
|
||||
|
||||
fs.rmSync(cacheDir, { recursive: true, force: true });
|
||||
console.log('[clean-vite] Removed', cacheDir);
|
||||
Reference in new issue
Block a user