1.0.0-preview.1 • Published 1 year ago

@magnolia/cli-plugin-generator v1.0.0-preview.1

Weekly downloads
-
License
SEE LICENSE IN LI...
Repository
-
Last release
1 year ago

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