Skip to Content
šŸŽ‰ Hyperse Wizard has been published.
DocumentationCustom Plugin

How to create a custom plugin

A plugin is a function that accepts a Wizard instance and returns a Wizard instance.

Usage

// @filename: @hyperse/wizard/dist/index.d.ts import { , } from '@hyperse/wizard'; export const = () => { return ({ // locale message key : 'plugins.newPlugin.name', : versionMessages, : () => { let = .( defineCommand('print', { // locale message key : 'plugins.newPlugin.command.description', }).process(() => { ..('hello world'); }) ); return ; }, }); }; // use plugin const = ({ : 'hps_cli', // locale message key : 'cli.versionCli.description', : () => { // locale message key return ('cli.versionCli.version', { : '1.0.0' }); }, : versionCliMessages, : () => { .('CLI errorHandler \n', ); }, }) .(()) .(); // execute command // node ./cli.js print
Last updated on