chore: add Windows compatibility for npm scripts (#1170)
<!-- This is an auto-generated description by cubic. -->
## Summary by cubic
Make npm scripts work on Windows by replacing rm -rf with rimraf and
using cross-env for environment variables. This enables local dev and
packaging on Windows without WSL.
- **Refactors**
- Changed clean to use rimraf and delete out and scaffold/node_modules.
- Prefixed dev:engine, staging:engine, and staging:gateway with
cross-env.
- **Dependencies**
- Added rimraf ^6.0.1. Run npm install.
<!-- End of auto-generated description by cubic. -->
Co-authored-by:
顾颢 <guhao@dayee.com>
正在显示
| ... | @@ -12,11 +12,11 @@ | ... | @@ -12,11 +12,11 @@ |
| "node": ">=20" | "node": ">=20" | ||
| }, | }, | ||
| "scripts": { | "scripts": { | ||
| "clean": "rm -rf out && rm -rf scaffold/node_modules", | "clean": "rimraf out scaffold/node_modules", | ||
| "start": "electron-forge start", | "start": "electron-forge start", | ||
| "dev:engine": "DYAD_ENGINE_URL=http://localhost:8080/v1 npm start", | "dev:engine": "cross-env DYAD_ENGINE_URL=http://localhost:8080/v1 npm start", | ||
| "staging:engine": "DYAD_ENGINE_URL=https://staging---dyad-llm-engine-kq7pivehnq-uc.a.run.app/v1 npm start", | "staging:engine": "cross-env DYAD_ENGINE_URL=https://staging---dyad-llm-engine-kq7pivehnq-uc.a.run.app/v1 npm start", | ||
| "staging:gateway": "DYAD_GATEWAY_URL=https://staging---litellm-gcp-cloud-run-kq7pivehnq-uc.a.run.app/v1 npm start", | "staging:gateway": "cross-env DYAD_GATEWAY_URL=https://staging---litellm-gcp-cloud-run-kq7pivehnq-uc.a.run.app/v1 npm start", | ||
| "package": "npm run clean && electron-forge package", | "package": "npm run clean && electron-forge package", | ||
| "make": "npm run clean && electron-forge make", | "make": "npm run clean && electron-forge make", | ||
| "publish": "npm run clean && electron-forge publish", | "publish": "npm run clean && electron-forge publish", | ||
| ... | @@ -79,6 +79,7 @@ | ... | @@ -79,6 +79,7 @@ |
| "lint-staged": "^15.5.2", | "lint-staged": "^15.5.2", | ||
| "oxlint": "^1.8.0", | "oxlint": "^1.8.0", | ||
| "prettier": "3.5.3", | "prettier": "3.5.3", | ||
| "rimraf": "^6.0.1", | |||
| "typescript": "^5.8.3", | "typescript": "^5.8.3", | ||
| "vite": "^5.4.17", | "vite": "^5.4.17", | ||
| "vitest": "^3.1.1" | "vitest": "^3.1.1" | ||
| ... | ... |
请
注册
或者
登录
后发表评论