napi-rs/cli/src/help.ts
2022-11-02 10:56:34 +08:00

13 lines
291 B
TypeScript

import { Command } from 'clipanion'
/**
* A command that prints the usage of all commands.
*
* Paths: `-h`, `--help`
*/
export class HelpCommand extends Command<any> {
static paths = [[`-h`], [`--help`]]
async execute() {
await this.context.stdout.write(this.cli.usage())
}
}