-
Notifications
You must be signed in to change notification settings - Fork 23
Plugin registry
Eduardo Bouças edited this page Feb 20, 2020
·
2 revisions
Sourcebit's interactive setup process allows users to choose plugins from a public repository, which lives in GitHub.
It consists of an array of objects with the following properties:
-
module
(String): The name of the plugin's npm module-
Example:
sourcebit-source-contentful
-
Example:
-
description
(String): A human-friendly description of the plugin-
Example:
A Contentful source plugin for Sourcebit
-
Example:
-
author
(String): The name/handle of the plugin's author-
Example:
John Doe <[email protected]>
-
Example:
-
type
(enum:source|target
): The type of plugin-
Example:
source
-
Example:
You can create your own plugins.json
file and tell the setup process to use it. This is useful when you're developing a plugin locally and you want it to appear on the list of available plugins without having to publish it to the official registry.
To use a local plugin registry, create a file with the structure above and start the setup process with the --plugins
flag pointing to its path.
npx create-sourcebit --plugins=./my-plugins.json
✏️ Example
[
{
"module": "/Users/johndoe/sourcebit-source-contentful",
"description": "A Contentful source plugin for Sourcebit",
"author": "Stackbit",
"type": "source"
},
{
"module": "/Users/johndoe/sourcebit-target-jekyll",
"description": "A Sourcebit plugin for Jekyll",
"author": "Stackbit",
"type": "target"
}
]
If you'd like your plugin to appear as an option within the interactive setup process, please add it to the registry file by submitting a pull request.