From 62be6100c62c154ac3ec59267862f8e7f2271aa2 Mon Sep 17 00:00:00 2001 From: Axel Boberg Date: Thu, 16 May 2024 17:55:42 +0200 Subject: [PATCH] Add build instructions for plugins Signed-off-by: Axel Boberg --- docs/plugins/README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/plugins/README.md b/docs/plugins/README.md index a38a41d..8a6895f 100644 --- a/docs/plugins/README.md +++ b/docs/plugins/README.md @@ -11,6 +11,7 @@ Plugins allows Bridge to be extended with functionality, both through the backen - [main](#main) - [engines](#engines) - [contributes](#contributes) + - [Building plugins](#building-plugins) - [Installing plugins](./installation.md) - [API reference](/docs/api/README.md) @@ -102,3 +103,10 @@ Declare what version of Bridge is required to run the plugin. This property is r #### contributes **Optional** Optionally declare contributions made by this plugin. See the [API documentation](/docs/api/README.md) for specifics. + +### Building plugins +Plugins are agnostic to the choice of build tool as long as the resulting code is commonJS (for backend/worker code) and fully resolved (for frontend/widget code), and packaged as a directory with a `package.json` file. + +The only call to require that's allowed in frontend code is `require('bridge')` as that will be resolved during runtime. + +Backend code can require external libraries.