/element-composer

Runtime HTML page composer

Primary LanguageTypeScriptApache License 2.0Apache-2.0

Element composer has been merged in micro-lc!

From version 2, the composition functionality is dicrectly shipped by micro-lc. Refer to the official documentation for more details.


Element composer

Mia-Platform

For the complete documentation of the plugin, please see the dedicated documentation page.

The project is a monorepo built with yarn workspaces and lerna. All workspaces can be found under the packages folder. Each package has its own readme file which contains detailed information about its content.

Vertical micro-frontend

Are you interested in vertical split micro-frontends?

Take also a look at micro-lc!

Set up the local environment

To develop the service locally you need:

  • Node.js v14 or later,
  • Yarn 1.x.x

To set up node.js, we suggest using nvm, so you can manage multiple versions easily. Once you have installed nvm, you can go inside the directory of the project and simply run nvm install, the .nvmrc file will install and select the correct version if you don’t already have it.

To install Yarn, run npm install --global yarn.

Once you have all the dependency in place, you can launch:

yarn install

This command will install the dependencies for every workspace and will trigger a build of the core workspace.

Start the project

In order to try micro-lc-element-composer on your machine with mocked configurations, you have to execute only the dev script, using the following command:

yarn dev

Run a package script

To run a script in a workspace, you can run yarn workspace PACKAGE_NAME SCRIPT_NAME. For example, to run tests in fe-container you should run:

yarn workspace fe-container test

or you can use the shortcut:

yarn fe-container test