napi-rs/src/index.ts

20 lines
333 B
TypeScript
Raw Normal View History

2020-07-27 00:53:09 +09:00
import { Cli } from 'clipanion'
import { BuildCommand } from './build'
const cli = new Cli({
binaryName: 'bin',
binaryVersion: require('../package.json').version,
})
cli.register(BuildCommand)
cli
.run(process.argv.slice(2), {
...Cli.defaultContext,
})
.catch((e) => {
console.error(e)
process.exit(1)
})