camunda / camunda-modeler

An integrated modeling solution for BPMN, DMN and Forms based on bpmn.io.
https://camunda.com/products/modeler
MIT License
1.49k stars 476 forks source link

Plugins: improve getPluginsDirectory to point to folder of plugin #670

Closed philippfromme closed 5 years ago

philippfromme commented 6 years ago

Currently getPluginsDirectory only returns the base path to the plugins folder. Therefore things like renaming the folder of a plugin or nesting it in another folder will break paths to assets that are requested like

var img = document.createElement('img');
img.src = getPluginsDirectory() + '/camunda-modeler-plugin-example/logo.png';
nikku commented 5 years ago

We decided to go for logical path to retrieve plug-in assets instead.

Plugin authors may use urls of the style app-plugins://{name}/{path-to-asset} and we figure out the actual file system location for her.