Skip to content

Commit

Permalink
feat(plugins): resolve from resources/plugins
Browse files Browse the repository at this point in the history
* make resources/plugins the first path to search for
  plug-ins
* update plugins stub ship with release
* update plug-in documentation

Closes #597
  • Loading branch information
nikku authored and barmac committed Jan 24, 2019
1 parent 40c97ec commit 766f54e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
2 changes: 2 additions & 0 deletions app/lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,9 @@ app.on('ready', function() {

app.plugins = new Plugins({
paths: [
path.join(app.getPath('userData'), 'resources'),
app.getPath('userData'),
path.join(appPath, 'resources'),
appPath
].concat(app.developmentMode ? [ path.resolve(__dirname + '/../../resources') ] : [])
});
Expand Down
10 changes: 5 additions & 5 deletions docs/plugins/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ Plugins allow you to change the appearance and behavior of the Camunda Modeler a

## Plugging into the Camunda Modeler

You can plug into the modeler in order to change its appearance, add new menu entries or extend the modeling tools for [BPMN](https://github.com/bpmn-io/bpmn-js), [CMMN](https://github.com/bpmn-io/cmmn-js) and [DMN](https://github.com/bpmn-io/dmn-js). Adding a plugin is as easy as putting the files into the directory `{MODELER_LOCATION}/plugins`.
On macOS, the application searches for plugins in the directory `/Users/{USER_NAME}/Library/Application Support/camunda-modeler/plugins`.
You can plug into the modeler in order to change its appearance, add new menu entries or extend the modeling tools for [BPMN](https://github.com/bpmn-io/bpmn-js), [CMMN](https://github.com/bpmn-io/cmmn-js) and [DMN](https://github.com/bpmn-io/dmn-js). Adding a plugin is as easy as putting the files into the directory `{MODELER_LOCATION}/resources/plugins`.
On macOS, the application searches for plugins in the directory `/Users/{USER_NAME}/Library/Application Support/camunda-modeler/resources/plugins`.

So let's dive into how to add your own plugins.

Expand Down Expand Up @@ -145,13 +145,13 @@ Bundle your plugin:
npm run build
```

Finally, put the folder into the `plugins` directory relative to your Camunda Modeler installation directory. You can now use your plugin!
Finally, put the folder into the `resources/plugins` directory relative to your Camunda Modeler installation directory. You can now use your plugin!

### Development Workflow

When creating a plugin you can place the directory containing your plugin in the aforementioned `plugins` directory.
When creating a plugin you can place the directory containing your plugin in the aforementioned `resources/plugins` directory.

Plugins will be loaded on application startup (menu plugins) or reload (style and modeling tool plugins). To reload the application, open the developer tools F12 and press CtrlOrCmd+R. This will clear all unsaved diagrams!
Plugins will be loaded on application startup (menu plugins) or reload (style and modeling tool plugins). To reload the application, open the developer tools F12 and press `CtrlOrCmd + R`. This will clear all unsaved diagrams!

## Additional Resources

Expand Down
File renamed without changes.

0 comments on commit 766f54e

Please sign in to comment.