Skip to content

Commit

Permalink
Update integration-guide.rst - update to AboutView from About (#882)
Browse files Browse the repository at this point in the history
* Update integration-guide.rst

Update web plugin import of the About component

* Update integration-guide.rst
  • Loading branch information
vividDuck committed Oct 25, 2023
1 parent 7c10613 commit 52a8353
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions docs/integration-guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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 (
Expand Down Expand Up @@ -337,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.

Expand Down Expand Up @@ -380,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:

Expand Down Expand Up @@ -409,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
Expand Down

0 comments on commit 52a8353

Please sign in to comment.