napi-rs/cli/src/help.ts

14 lines
291 B
TypeScript
Raw Normal View History

2022-11-02 11:56:34 +09:00
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())
}
}