This project creates a bundle of the bpmn.io components, at the end of the bundling process there is one javascript file and one css file ready to use.
Motivation: We created this project to solve a bundling issue, when using
aurelia and bpnm.io there are some dependencies that cannot be resolved. For
example some parts of bpnm.io require the NodeJS fs
module.
To get around this issue we tried using the bower-bpmn-js
module via bower in our aurelia application. This worked but we also needed
the bpmn-js-properties-panel
module, but there was no bower version for that (See bpmn-io/bpmn-js-properties-panel#197).
This projects aims to solve the problem by bundling bower-bpmn-js
and
bpmn-js-properties
into a single file.
- Node
>= 0.6.0
- Grunt
$ npm install
$ npm run build
This creates all bundled files in the dist
folder.
$ npm install --save @process-engine/bpmn-js-custom-bundle
This will install the project in node_modules
, we need to tell aurelia
how to load this bundle into the application:
{
"name": "@process-engine/bpmn-js-custom-bundle",
"path": "../node_modules/@process-engine/bpmn-js-custom-bundle/dist",
"main": "bpmn-modeler-custom.js",
"resources": [
"bpmn-modeler-custom.css",
"bpmn-modeler-custom.js"
]
}
Inside your templates you can now use:
<template>
<require from="@process-engine/bpmn-js-custom-bundle/bpmn-modeler-custom.css"></require>
...
</template>
And inside your javascript files:
import * as BPMNModeler from '@process-engine/bpmn-js-custom-bundle';
$ npm run build
$ # bump version in package.json
$ npm publish
- Paul Heidenreich [email protected]
- Alexander Kasten [email protected]