@owdproject/core
Version:
<p align="center"> <img width="160" height="160" src="https://avatars.githubusercontent.com/u/65117737?s=160&v=4" /> </p> <h1 align="center">Open Web Desktop</h1> <h3 align="center"> A modular framework for building web-based desktop experiences. </h3
29 lines (21 loc) • 615 B
JavaScript
import { spawn } from 'child_process'
const [, , cmd, pkgName, ...rest] = process.argv
const commandMap = {
'install-app': 'desktop:install-app',
'install-module': 'desktop:install-module',
'install-theme': 'desktop:install-theme',
}
if (!commandMap[cmd]) {
console.error(`Unknown command: ${cmd}`)
process.exit(1)
}
if (!pkgName) {
console.error('Missing package name (e.g., @owdproject/package)')
process.exit(1)
}
const nxArgs = ['run', commandMap[cmd], `--name=${pkgName}`, ...rest]
const child = spawn('pnpm', ['nx', ...nxArgs], {
stdio: 'inherit',
shell: true,
})