close

Filter

loading table of contents...

Blueprint Developer Manual / Version 2304

Table Of Contents
Working with the Plugin Workspace

Like the Maven workspaces for the (Java) CoreMedia applications, plugins can be built independently of the Blueprint workspace. For example, it does not utilize any dependencies of the Blueprint workspace. This is important, so that your plugin can be updated and released independently of your Blueprint customizations and a concrete CoreMedia release.

A Studio client package containing a plugin is built just like a normal Studio client package in the Blueprint workspace: You can compile the code with pnpm run build, resulting in JavaScript files and resources in the dist directory. The code can also be watched and linted as usual. What is different is, that by executing pnpm run package, a zip archive is created inside the build directory, containing all resources needed by the plugin. This file can be seen as a "binary" release of your Studio client plugin.

The same plugin can be added to multiple apps as long as the dependencies are satisfied by the corresponding app.

The package created by the starter kit also contains configuration to conveniently run the local development state of your plugin. You need a ready-to-run Studio app as described in Section 4.3, “Build and Run the Applications”.

Note

Note

If the feature you develop as a plugin also plugs into Studio server (which is a common case), take care that this Studio client is connected to a Studio server including the corresponding plugin.

To activate your Studio client plugin, you have the following options:

  • If you want to use the Studio client Docker image, you only need to mount your plugin's dist directory as a volume under /coremedia/plugins/APP_NAME where APP_NAME is the app the plugin should be added to (for example, studio-client.main). After running the Studio client Docker image the corresponding app will pick up your plugin. If you used an invalid identifier for APP_NAME it will be logged as a warning during container startup.

    In order to add multiple plugins just put them into separate subfolders. The mechanism will just scan any nested directory structure below /coremedia/plugins/APP_NAME until a package is encountered.

  • If you want to run a Studio client app from your Blueprint workspace via pnpm with your plugin, you must configure the path to your plugin's dist folder for jangaroo run (which is started via the start script). This can be done by using the parameter additionalPackagesDirs, for example:

    pnpm run start --additionalPackagesDirs ~/workspace/my-plugin/studio-client/target/app

    You may also specify multiple additional package directories to add multiple plugins at once (make sure to quote paths containing spaces):

    pnpm run start --additionalPackagesDirs ~/workspace/my-plugin/studio-client/target/app "~/workspace/other plugin/studio-client/target/app"
  • If you do want to start a Studio client app locally you can also connect via HTTP(S) against a Studio client app that is already deployed on a webserver. In order to do so the package containing the plugin also has a start script utilizing jangaroo run which can be called with the parameter proxyTargetUri containing the URL to the deployed Studio Client app, for example:

    pnpm run start --proxyTargetUri http://some-host/studio
Note

Note

All parameters provided to Jangaroo commands like jangaroo run can alternatively also be put into environment variables or the jangaroo.config.js file (see Section 4.1, “Setting Up the Workspace and IDE” in Studio Developer Manual for details).

Search Results

Table Of Contents
warning

Your Internet Explorer is no longer supported.

Please use Mozilla Firefox, Google Chrome, or Microsoft Edge.