Skip to Content
🎉 Hyperse Wizard has been published.

Loader Plugin

The Loader Plugin provides automatic discovery and dependency management for CLI applications built with Wizard.

Installation

npm install @hyperse/wizard-plugin-loader

Quick Start

// @filename: @hyperse/wizard-plugin-loader/dist/index.d.ts import { } from '@hyperse/wizard'; import { } from '@hyperse/wizard-plugin-loader'; const = ({ : 'my-cli', : 'My CLI application', : '1.0.0', }); .( ({ : ['version-plugin'], : ['help-*/package.json'], : ['./plugins'], : .(), }) ) .(); // execute command // node ./cli.js --version // print version information // v1.0.0

API Reference

Parameters:
NameTypeDefault
optionsLoaderPluginOptions

The options for the plugin.

Returns:
Promise<Plugin<object, object, FlagsWithBuiltin, FlagsWithBuiltin>>
  • LoaderPluginOptions
NameTypeDefault
pluginPackPatternstring[]

The plugin pack pattern to load.

pluginSearchDirsstring[]

The directory search from, it should not include node_modules

cwdstring

The directory to begin resolving from

process.cwd()
pluginsstring[]

The manual load external plugin package names

[]
Last updated on