Sfoglia il codice sorgente

chore(build): support rush build on windows (#397)

WanderWang 6 mesi fa
parent
commit
b211d0774f
2 ha cambiato i file con 7 aggiunte e 3 eliminazioni
  1. 4 3
      apps/docs/package.json
  2. 3 0
      common/config/rush/pnpm-lock.yaml

+ 4 - 3
apps/docs/package.json

@@ -3,8 +3,8 @@
   "version": "0.0.1",
   "version": "0.0.1",
   "private": true,
   "private": true,
   "scripts": {
   "scripts": {
-    "build": "NODE_OPTIONS='--max-old-space-size=8192' && rm -rf ./doc_build && rspress build && shx cp -r llms/* doc_build/",
-    "docs": "NODE_OPTIONS='--max-old-space-size=8192' tsx ./scripts/auto-generate.ts",
+    "build": "cross-env NODE_OPTIONS=--max-old-space-size=8192 && shx rm -rf ./doc_build && rspress build && shx cp -r llms/* doc_build/",
+    "docs": "cross-env NODE_OPTIONS=--max-old-space-size=8192 && tsx ./scripts/auto-generate.ts",
     "dev": "rspress dev",
     "dev": "rspress dev",
     "lint": "eslint ./components --cache",
     "lint": "eslint ./components --cache",
     "preview": "rspress preview",
     "preview": "rspress preview",
@@ -62,7 +62,8 @@
     "openai": "~4.98.0",
     "openai": "~4.98.0",
     "dotenv": "~16.5.0",
     "dotenv": "~16.5.0",
     "tsx": "~4.19.4",
     "tsx": "~4.19.4",
-    "shx": "0.4.0"
+    "shx": "0.4.0",
+    "cross-env": "~7.0.3"
   },
   },
   "homepage": "https://github.com/bytedance/flowgram.ai/"
   "homepage": "https://github.com/bytedance/flowgram.ai/"
 }
 }

+ 3 - 0
common/config/rush/pnpm-lock.yaml

@@ -871,6 +871,9 @@ importers:
       '@types/node':
       '@types/node':
         specifier: ^18
         specifier: ^18
         version: 18.19.68
         version: 18.19.68
+      cross-env:
+        specifier: ~7.0.3
+        version: 7.0.3
       dotenv:
       dotenv:
         specifier: ~16.5.0
         specifier: ~16.5.0
         version: 16.5.0
         version: 16.5.0