@napi-rs/cli
Version:
Cli tools for napi-rs
16 lines (13 loc) • 350 B
text/typescript
import { Command } from 'clipanion'
import { CLI_VERSION } from '../utils/misc.js'
/**
* A command that prints the version of the CLI.
*
* Paths: `-v`, `--version`
*/
export class CliVersionCommand extends Command<any> {
static paths = [[`-v`], [`--version`]]
async execute() {
await this.context.stdout.write(`${CLI_VERSION}\n`)
}
}