Pexip plugins have a basic folder structure that is used to allow for easy development of plugins.
In the below example, we have created a plugin with the name of
folder for this plugin would be laid out as follows.
↳ 📁 assets
↳ 📁 css
↳ 📁 images
↳ 📄 buttonImage.svg
↳ 📁 js
↳ 📄 <name>.plugin.js
↳ 📄 <name>.plugin.package.json
A brief explanation of each of the files is below.
css - this contains any additional CSS.
images - this contains any image files for the plugin, it is preferred that images are in the SVG vector format to allow for scaling between devices without loss of quality
This file is used to set up the plugin, it contains metadata to link the webapp2 project to the plugin so that it understands how to render the plugin. This file contains information such as what toolbar icons to show etc. and which platforms to show the plugin on.
For more information please refer to the
<name> section which contains an
in-depth deep dive into this file and its structure.
This file contains the actual plugin code. This file contains code to enact on load and unload of the plugin as well as instantiating the plugin itself.