This is a boilerplate for a Kirby Panel plugin that uses Rollup.js as an alternative to Parcel.js utilized by the official pluginkit. No other parts of the pluginkit were modified.
Rollup offers more fine-graned control over the build process and requires less node modules to install. This pluginkit has been successfully field-tested to compile the Kirby Editor.
- Fork this repository
- Change the plugin name and description in the
composer.json
- Change the plugin name in the
index.php
andsrc/index.js
- Change the license if you don't want to publish under MIT
- Add your plugin code to the
index.php
andsrc/index.js
- Update this
README
with instructions for your plugin
We use Rollup.js for the development and build setup.
Rollup plugins needed for compiling Vue templates, Sass as well as bundling are handled b default. To install the required node modules, run:
npm install
You can start the dev process with …
npm run dev
This will automatically update the index.js
and index.css
of your plugin as soon as you make changes.
It will also enable hot module reloading in the panel. Reload the panel once and afterwards you should
see changes immediately without further reloading.
As soon as you are happy with your plugin, you should build the final version with
npm run build
This will automatically create a minified and optimized version of your index.js
and index.css
which you can ship with your plugin.
We have a tutorial on how to build your own plugin based on the Pluginkit in the Kirby documentation.
What follows is an example README for your plugin.
Download and copy this repository to /site/plugins/{{ plugin-name }}
.
git submodule add https://github.com/{{ your-name }}/{{ plugin-name }}.git site/plugins/{{ plugin-name }}
composer require {{ your-name }}/{{ plugin-name }}
Additional instructions on how to configure the plugin (e.g. blueprint setup, config options, etc.)
Document the options and APIs that this plugin offers
Add instructions on how to help working on the plugin (e.g. npm setup, Composer dev dependencies, etc.)
MIT