@magnolia/cli-plugin-generator
TypeScript icon, indicating that this package has built-in type declarations

1.0.0-preview.1 • Public • Published

CLI Plugin Generator

The Plugin Generator integrates with the Magnolia Command Line Interface (CLI). Its primary function is to easily create a new plugin from a template which would be compatible with CLI.

Installation

The Plugin Generator is pre-installed in the Magnolia CLI plugin-system and ready for used.

Start

Available command-line options:

  • -n, --name <name>, set the name of the plugin
  • -c, --class-name <class-name>, set the name of the plugin's main class

If you don't provide these options, you'll be asked to enter the plugin and class name.

Additional Information:

  • The <name> will also serve as the name in the 'package.json' file.

Usage Example

mkdir testPluginFolder
cd testPluginFolder
npx @magnolia/cli @magnolia/cli-plugin-generator --name "cli-test-plugin" --class-name "TestPlugin"

Upon executing the command, the following structure will be created:

/testPluginFolder
|-- /index.ts
|-- /tsconfig.json
|-- /cli-test-plugin.ts
|-- /package.json
|-- /package-lock.json
|-- /node_modules

Readme

Keywords

none

Package Sidebar

Install

npm i @magnolia/cli-plugin-generator

Weekly Downloads

3

Version

1.0.0-preview.1

License

SEE LICENSE IN LICENSE.txt

Unpacked Size

36.7 kB

Total Files

22

Last publish

Collaborators

  • magnolia