On this page
How-to
Make a plug-in for the collection
Add a new plug-in to this repository, from its folder to its help pages and its place in the catalogue. At the end it is tested, listed and ready to publish.
Before you begin
- A copy of the starboard-plugins repository and of Starboard, for the plug-in tester.
- Python 3, and Docker to build and smoke-test an image.
- Read Plug-in API 1.15 for the collection.
Steps
- Make a folder named after its id, such as
disk-forecast, withstarboard-plugin.json,README.md,LICENSEandinstall.py(copyLICENSEandinstall.pyfrom Styles). - For a small card plug-in, add it to
tools/examples_src.pyinstead, and runtools/make_examples.py: it writes the folder, the README and the changelog from one place, on the shared image. - Draw its logo: add it to
tools/make_logos.pyand run it. Every logo is a rounded tile in one colour, with a white symbol and at least 4.5 to 1 contrast. - Test it with Starboard's plug-in tester, from your Starboard copy:
python3 -m starboard.plugin_tester <path to>/starboard-plugin.json
- Add tests in
tests/, and run them all:
python3 -m unittest discover -s tests
- Run the smoke test, which runs each image hardened, as Starboard does, against stand-ins:
STARBOARD_SRC=<your Starboard copy> python3 tools/smoke_test.py
- Write its help: put it in one group in
help-centre.json, underplugins, and write its seven pages inhelp/plugins/<id>/. Then check them:
python3 tools/check_help.py
- Pin its image by digest once GitHub has built it, then run
tools/make_examples.py(it writescatalogue.json) andtools/make_zips.py.
Things to note
- A plug-in is listed as published only when every image it runs is pinned by digest, or it runs none.
- The help centre is built from
help/and each README by the design system's builder, and published whenmainchanges. A page left as a placeholder stops the build.
Find out more
This page on GitHub, where the help is written.