@zenginehq/generator-zn-plugin

Zengine Plugin Generator for Yeoman

Usage no npm install needed!

<script type="module">
  import zenginehqGeneratorZnPlugin from 'https://cdn.skypack.dev/@zenginehq/generator-zn-plugin';
</script>

README

Zengine Plugin Generator for Yeoman

Yeoman Generators for Zengine Plugins

Install

If you don't have yeoman.io installed

npm install -g yo

Then install the generator:

# Remove unsupported deprecated generator
npm uninstall -g generator-zn-plugin

# Current version for Mayan and V2 plugins
npm install -g @zenginehq/generator-zn-plugin

# Legacy version for Mayan and V1 plugins
npm install -g @zenginehq/generator-zn-plugin@legacy

You can then keep it up to date with:

npm upgrade -g @zenginehq/generator-zn-plugin

Zengine V2 Plugins

As of the latest release the generator will only generate V2 plugins.

You can always npm install -g @zenginehq/generator-zn-plugin@legacy if you need V1 plugin support.

See Zengine Migrator for more info on V1 vs V2 Zengine plugins.

Usage

Creating a full plugin

# change to your projects directory
cd Projects

# run yo
yo @zenginehq/zn-plugin zn-plugin-demo

# then install npm modules
cd zn-plugin-demo

npm install

Adding a backend service for an existing plugin

# change to your plugin directory
cd zn-plugin-demo

# run yo
yo @zenginehq/zn-plugin:backend my-test-api

# then install npm modules
cd my-test-api

npm install

Adding a new frontend plugin for an existing plugin

# change to your plugin directory
cd zn-plugin-demo

# run yo
yo zn-plugin:frontend my-test-ui

# then install npm modules
cd my-test-ui

npm install

Contribute

See the contributing.