Skip to content

Creating Plugins

Brian Muenzenmeyer edited this page Sep 23, 2016 · 14 revisions

Plugin support is still in alpha. Try it out and provide feedback!

Reference Implementation

You can find the first Node plugin at https://github.com/pattern-lab/plugin-node-tab which is well-commented and covers both frontend and backend needs. It will be used as an example throughout the rest of this page.

Backend Plugin Anatomy

Events

Frontend Plugin Anatomy

Plugins need to output their configuration and files to the Pattern Lab frontend in order to be found and initialized. Study plugin-loader.js to better understand how to load templates, stylesheets, and javascript from your plugin.

Plugins will be installed into the public/patternlab-components/pattern-lab/ directory.

Frontend plugin output

Clone this wiki locally