napi-rs/cli/cli.mjs
forehal a781a4f27e feat(cli): brand new cli tool with both cli and programmatical usage (#1492)
BREAKING CHANGE: requires node >= 16 and some cli options have been renamed
2023-04-06 11:04:53 +08:00

12 lines
303 B
JavaScript
Executable file

import { execSync } from 'child_process'
import { resolve } from 'path'
import { fileURLToPath } from 'url'
execSync(
`node --loader ts-node/esm/transpile-only ${resolve(fileURLToPath(import.meta.url), '../src/cli.ts')} ${process.argv
.slice(2)
.join(' ')}`,
{
stdio: 'inherit',
},
)