mirror of
https://github.com/Boof2015/prism.git
synced 2026-08-17 11:11:18 +02:00
prism-tui PoC
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
const { spawnSync } = require('node:child_process')
|
||||
|
||||
const scriptByPlatform = {
|
||||
darwin: 'dist:mac',
|
||||
linux: 'dist:linux',
|
||||
win32: 'dist:win',
|
||||
}
|
||||
|
||||
const script = scriptByPlatform[process.platform]
|
||||
if (!script) {
|
||||
console.error(`Packaging is not configured for ${process.platform}.`)
|
||||
process.exit(1)
|
||||
}
|
||||
|
||||
const npmCommand = process.platform === 'win32' ? 'npm.cmd' : 'npm'
|
||||
const result = spawnSync(npmCommand, ['run', script], { stdio: 'inherit' })
|
||||
process.exit(result.status ?? 1)
|
||||
Reference in New Issue
Block a user