瀏覽代碼

[SugarCube] Ship typescript-result for people who can't compile it and disable typescript in bat-file if node isn't installed.

Stephan Fuchs 2 月之前
父節點
當前提交
c236007a13
共有 2 個文件被更改,包括 10 次插入2 次删除
  1. 10 2
      buildHTML.bat
  2. 0 0
      qsrc2tw/twine-code/-generatedFromTS/typescript-min.js

+ 10 - 2
buildHTML.bat

@@ -6,8 +6,16 @@ PUSHD %1
 cd ./qsrc2tw/tools/QSRC2TW
 CALL QSRC2TW.exe -in "%LOCATIONS%" -out "../../twine-code"
 cd ../..
-call npx tsc
-call npx esbuild "temp/typescript.js" --minify --outfile="twine-code/-generated/typescript-min.js"
+
+REM Check if node is installed
+node -v 2> Nul
+if "%errorlevel%" == "9009" (
+    echo node could not be found
+) else (
+	call npx tsc
+	call npx esbuild "temp/typescript.js" --minify --outfile="twine-code/-generatedFromTS/typescript-min.js"
+)
+
 POPD
 
 if %PROCESSOR_ARCHITECTURE% == AMD64 (

文件差異過大導致無法顯示
+ 0 - 0
qsrc2tw/twine-code/-generatedFromTS/typescript-min.js


部分文件因文件數量過多而無法顯示