Generate plugin
A plugin to generate a basic structure for a new Magnolia CLI plugin.
Package name |
|
Repository link |
|
Latest version |
|
Changelog link |
For instructions how to create and test new plugins, please refer to the following pages: |
Installing
This plugin comes pre-installed and is ready to be used.
You must install it manually for use in an already initialized project (containing the mgnl.config.js file).
|
Usage
Options
Form (short and long) | Description |
---|---|
|
Sets the name of the plugin. |
|
Sets the name of the plugin’s main class. |
|
Displays the version. |
|
Displays help information. |
Examples
Each example command creates the new plugin in the current working directory. If you’re not in an empty directory, create it first and change to it:
Then, execute the |
For more information about creating plugins, refer to Creating plugins page.
Generate a new plugin
npx @magnolia/cli generate-plugin
This command creates a new plugin.
The plugin will prompt you to enter the:
-
Name of the plugin.
-
Name of the plugin’s main class.