x
This commit is contained in:
14
frontend/scripts/run-build-inner.mjs
Normal file
14
frontend/scripts/run-build-inner.mjs
Normal file
@@ -0,0 +1,14 @@
|
||||
import { spawnSync } from 'node:child_process'
|
||||
import { dirname, join } from 'node:path'
|
||||
import { fileURLToPath } from 'node:url'
|
||||
|
||||
const root = join(dirname(fileURLToPath(import.meta.url)), '..')
|
||||
|
||||
function run(scriptArgs) {
|
||||
const r = spawnSync(process.execPath, scriptArgs, { stdio: 'inherit', cwd: root })
|
||||
if (r.status !== 0) process.exit(r.status ?? 1)
|
||||
}
|
||||
|
||||
run([join(root, 'scripts', 'ensure-native-bindings.mjs')])
|
||||
run([join(root, 'node_modules/typescript/bin/tsc'), '-b'])
|
||||
run([join(root, 'node_modules/vite/bin/vite.js'), 'build'])
|
||||
Reference in New Issue
Block a user