From 68526962c753d1968b59809c58223ae84c7fe850 Mon Sep 17 00:00:00 2001 From: vividDuck <122105925+vividDuck@users.noreply.github.com> Date: Mon, 16 Oct 2023 12:24:43 +0000 Subject: [PATCH 1/2] Update integration-guide.rst Update web plugin import of the About component --- docs/integration-guide.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/integration-guide.rst b/docs/integration-guide.rst index 31bfdda6f..4b46d2f50 100644 --- a/docs/integration-guide.rst +++ b/docs/integration-guide.rst @@ -251,6 +251,7 @@ Let's go to the ``docker/plugins`` directory within ``mwdb-core`` repository and First is ``package.json`` that contains short specification of our plugin. Name must contain ``@mwdb-web/plugin-`` prefix. .. code-block:: json + { "name": "@mwdb-web/plugin-hello-world", "version": "0.0.1", @@ -269,7 +270,7 @@ Finally we can write simple plugin that adds new ``Hello world`` page. Let's che // Import from MWDB Core commons and components import { View } from "@mwdb-web/commons/ui"; - import About from "@mwdb-web/components/About"; + import { AboutView } from "@mwdb-web/components/Views/AboutView"; function HelloWorld() { return ( From 244b82e91f89a3bf3f9340ff1ce49a94333425c0 Mon Sep 17 00:00:00 2001 From: vividDuck <122105925+vividDuck@users.noreply.github.com> Date: Mon, 16 Oct 2023 12:29:52 +0000 Subject: [PATCH 2/2] Update integration-guide.rst --- docs/integration-guide.rst | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/docs/integration-guide.rst b/docs/integration-guide.rst index 4b46d2f50..71eca1e4c 100644 --- a/docs/integration-guide.rst +++ b/docs/integration-guide.rst @@ -338,10 +338,10 @@ So ``navbar`` is one of ``Extendable`` wrappers that can be found within applica Web plugins: how it works internally? ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -There are two requirements to be fulfilled by plugin engine: +There are two requirements to be fulfilled by the plugin engine: -* Plugin code needs to be loaded and executed along with core application -* Plugin must be allowed to reuse and extend core application parts +* Plugin code needs to be loaded and executed along with the core application +* Plugin must be allowed to reuse and extend the core application parts MWDB uses Rollup import aliases and Vite virtual modules to make a link between plugin code and the core. @@ -381,7 +381,7 @@ as ``@mwdb-web/*`` aliases: Building customized images -------------------------- -If you want to extend MWDB with new features using plugin system, it's always useful to be able to build your own customized Docker images. +If you want to extend MWDB with new features using the plugin system, it's always useful to be able to build your own customized Docker images. There are two ways to do that: @@ -410,6 +410,7 @@ Building custom backend image is simple as in `Dockerfile` below: Backend plugins are linked in runtime, so that part is pretty easy to extend. A bit more complicated thing is frontend part: .. code-block:: Dockerfile + ARG MWDB_VERSION=v2.9.0 FROM certpl/mwdb-web-source:$MWDB_VERSION AS build