From fd00b56f1254ff9e9ca9a2cdada2baa608aa4e61 Mon Sep 17 00:00:00 2001 From: Cris Stringfellow <22254235+crislin2046@users.noreply.github.com> Date: Thu, 29 Aug 2024 21:28:14 +0800 Subject: [PATCH] cross x build --- exec.js | 6 ++++++ package.json | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 exec.js diff --git a/exec.js b/exec.js new file mode 100644 index 0000000..8de80b1 --- /dev/null +++ b/exec.js @@ -0,0 +1,6 @@ +import path from 'path'; +import {execSync} from 'child_process'; + +const runPath = path.resolve(process.argv[2]); +execSync(`"${runPath}"`,{stdio:'inherit'}); + diff --git a/package.json b/package.json index cbf454a..78e4875 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ }, "scripts": { "start": "node --max-old-space-size=4096 src/app.js", - "build": "bash ./scripts/build_only.sh", + "build": "node exec.js \"./scripts/build_only.sh\"", "clean": "rm package-lock.json; rm -rf node_modules; rm -rf build/*", "test": "node --watch src/app.js", "inspect": "node --inspect-brk=127.0.0.1:9999 src/app.js",