Skip to content

Plugin Modules

johannesheucher-gip edited this page Aug 21, 2023 · 3 revisions

In your Zeta project, you can use all the Xyna modules of other Xyna repositories like the Process Monitor or the Xyna Properties.

Add respective repositories as git submodules

It is common practice to place all the Xyna Factory modules inside a folder xfm.

Example for the Factory Manager Repository

inside root folder: git submodule add https://github.com/Xyna-Factory/xyna-factory-manager.git impl/projects/xyna/src/app/xfm/factory-manager

Add environment paths

Add an environment path for each Xyna Factory module to tsconfig.json’s paths:

  • Factory Manager: @fman
  • Process Modeller: @pmod
  • Yggdrasil: @yggdrasil

Example for Factory Manager

"paths": {
  …
  "@fman/*": ["projects/xyna/src/app/xfm/factory-manager/*"],
  …
}

Import respective modules

Import the desired modules inside your module where you want to use the Xyna component.

Example for Factory Manager

Add FactoryManagerModule to the imports list of your module.

Import styles of the Xyna Factory modules

Inside app/_const.scss, import the respective "_const.scss" file from the xyna repository.

Example for the Factory Manager

@import 'xfm/factory-manager/const';

Use a component

Now, each component of the imported Xyna Factory module can be used. For example, add a route to a routing.ts:

{ path: 'xyna-properties', component: XynaPropertiesComponent, canActivate: [AuthGuard] }