Version Plugin
The Version Plugin provides version information for CLI applications built with Wizard.
Installation
npm install @hyperse/wizard-plugin-version
Quick Start
// @filename: @hyperse/wizard-plugin-version/dist/index.d.ts
import { } from '@hyperse/wizard';
import { } from '@hyperse/wizard-plugin-version';
const = ({
: 'my-cli',
: 'My CLI application',
: '1.0.0',
});
.(()).();
// execute command
// node ./cli.js --version
// print version information
// v1.0.0
API Reference
Parameters:Name | Type | Default |
---|---|---|
options | VersionPluginOptions |
Plugin<object, MergeCommandNameToContext<object, { version: object & { flags: { [x: string]: never; noColor: boolean; logLevel: "Error" | "Warn" | "Info" | "Debug" | "Verbose" | undefined; hpsAppEnv: string; hpsEnvPath: string | undefined; projectCwd: string; }; }; }>, FlagsWithBuiltin, FlagsWithBuiltin>
- VersionPluginOptions
Name | Type | Default |
---|---|---|
flag | boolean Whether to register the global version flag. | true |
Last updated on