Skip to Content
🎉 Hyperse Wizard has been published.

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:
NameTypeDefault
optionsVersionPluginOptions
Returns:
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
NameTypeDefault
flagboolean

Whether to register the global version flag.

true
hiddenPrefixboolean

Whether to print the version with not hidden v prefix.

false
Last updated on