Distribute the Plugin
note
In Reach every plugin must have a globally unique Plugin Id
- no matter if it's a global plugin or not.
#
Publish the Plugin to a Single SubscriptionWorking on the plugin with the npm run dev
command will only make the plugin available for you.
In order to make the plugin available for all users it has to be published to a subscription:
This will open your default Reach subscription in a new browser tab with the plugin loaded. Now you can review the plugin and verify that everything works as expected.
If you are an owner in the subscription you can publish the plugin. Publishing the plugin will automatically write the changes to the database, making the plugin available for all users within the subscription.
note
It's also possible to switch the subscription and publish the plugin to another one.
#
Publish in a CI/CD JobIf the plugin should be published as part of a CI/CD job the npm run publish
command can be used.
This requires a Reach API key. Please contact our support to obtain such a key.
#
Manage Installed PluginsYou can see a list of all plugins installed on your subscription by navigating to /admin/plugins
.
You can change settings and remove plugins in this list.
The changes you do here only affect the current subscription.
If you edit and save, the changes will be available to all users immediately.
#
Global PluginsYour definition.json
file can have an optional field isGlobal
. If this is omitted or set to false
your published plugin will only be available to users in the current subscription.
If you set isGlobal
to true any subscription owner can link this plugin to their subscription by using the plugin id.
However only you will be able to update the javascript code or the extensions
for the plugin. Other subscriptions can only override settings.
#
Linking a Global Plugin to your subscriptionA subscription owner can link a global plugin to their subscription in one of two ways:
- run
$ npm run link-to-subscription
- by navigating to
/admin/plugins
clicking theAdd new plugin
button and providing thePlugin Id
.
The plugin settings can be overwritten for each subscription that has the plugin linked.
For example if you install a global plugin which contains these settings:
you can then in your own subscription replace them with something else:
This can either be done by specifying specific settings in a definition.json
file and then calling the link-to-subscription
command or by updating them directly in Reach under /admin/plugins
.