소스 검색

build: Fix python execution paths in package.json for cross-platform support

unknown 2 달 전
부모
커밋
4ffc30c054
1개의 변경된 파일4개의 추가작업 그리고 4개의 파일을 삭제
  1. 4 4
      package.json

+ 4 - 4
package.json

@@ -6,10 +6,10 @@
   "scripts": {
     "dev": "npm run i18n:generate && vite",
     "build": "npm run i18n:generate && npm run sitemap:generate && vue-tsc && vite build",
-    "i18n:generate": "backend/venv/bin/python3 scripts/manage_locales.py split",
-    "sitemap:generate": "backend/venv/bin/python3 scripts/generate_sitemap.py",
-    "i18n:merge": "backend/venv/bin/python3 scripts/manage_locales.py merge",
-    "i18n:check": "backend/venv/bin/python3 scripts/manage_locales.py missing",
+    "i18n:generate": "node -e \"const cp=require('child_process'); try{cp.execSync('python scripts/manage_locales.py split', {stdio:'inherit'})}catch(e){try{cp.execSync('python3 scripts/manage_locales.py split', {stdio:'inherit'})}catch(e){process.exit(1)}}\"",
+    "sitemap:generate": "node -e \"const cp=require('child_process'); try{cp.execSync('python scripts/generate_sitemap.py', {stdio:'inherit'})}catch(e){try{cp.execSync('python3 scripts/generate_sitemap.py', {stdio:'inherit'})}catch(e){process.exit(1)}}\"",
+    "i18n:merge": "node -e \"const cp=require('child_process'); try{cp.execSync('python scripts/manage_locales.py merge', {stdio:'inherit'})}catch(e){try{cp.execSync('python3 scripts/manage_locales.py merge', {stdio:'inherit'})}catch(e){process.exit(1)}}\"",
+    "i18n:check": "node -e \"const cp=require('child_process'); try{cp.execSync('python scripts/manage_locales.py missing', {stdio:'inherit'})}catch(e){try{cp.execSync('python3 scripts/manage_locales.py missing', {stdio:'inherit'})}catch(e){process.exit(1)}}\"",
     "lint": "eslint . --ext ts,vue --report-unused-disable-directives --max-warnings 0",
     "preview": "vite preview",
     "test": "vitest run"