You want to build a JavaScript Module? Read the documentation 📖
This project is designed to support Javascript developers working with Jahia. It consists of two components:
- javascript-modules-engine: a Java OSGi Bundle deployed on a Jahia instance that enables the deployment and execution of Javascript modules.
- javascript-modules-library: a NPM package that provides TypeScript typings (.d.ts files) for the backend methods exposed by the Java OSGi bundle, along with some utility/helper code. By using this project, you can seamlessly integrate and manage Javascript modules within a Jahia environment.
Under the hood, this project used GraalJS (to run Javascript in a Java application) and includes a React (19.x) environment.
This project is a Maven multi-module project. The JavaScript module is built by Maven, which delegates the actual build process to Yarn (Maven is used as a wrapper).
Maven runs the node and yarn it finds on your PATH; it does not download them. The versions to use are pinned in mise.toml, and mise installs them for you:
mise trust && mise install
Any other way of putting those versions on your PATH works as well.
Then, to build both the backend engine and the javascript library, you simply need to run:
mvn clean verify
This is an Open-Source module, you can find more details about Open-Source @ Jahia in this repository