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",