With this release, we're officially discontinuing bower bundles for our BPMN modeler and toolkit as well as the bpmn-js seed project. Alternatives are already in place along with reworked and simplified examples.
Fetching versions of our BPMN toolkit via Bower has long been the recommended way of accessing pre-packaged distributions of our library. Bower, however is nowadays operating in maintainance mode. It has its disadvantages during build and distribution, too, such as the lack of a CDN to directly serve project assets. Those are just two good reasons we are discontinuing our bower bundles today.
From this release on, pre-packaged versions of bpmn-js are published directly with our releases to npm. Include these artifacts directly, without prior download via the unpkg CDN:
<script src="https://unpkg.com/bpmn-js@0.27.0/dist/bpmn-viewer.development.js"></script>
<script>
var viewer = new BpmnJS({ container: 'body' });
viewer.importXML(bpmnXML, function(err) {
if (err) {
console.log('error rendering', err);
} else {
console.log('we are good!');
}
});
</script>
Check out the new pre-packaged example to learn more.
Migrating from Bower
If you're currently relying on our bower distribution, include files directly from the unpkg CDN. Alternatively, download the latest toolkit directly from the releases page on GitHub or install them via npm.
Either way, the dist
folder provides pre-packaged variants of bpmn-js under the following names:
dist/bpmn-modeler.development.js
dist/bpmn-modeler.production.min.js
dist/bpmn-navigated-viewer.development.js
dist/bpmn-navigated-viewer.production.min.js
dist/bpmn-viewer.development.js
dist/bpmn-viewer.production.min.js
As in the bower packaging dist/assets
contains the diagram-js.css
as well
as the bpmn font distribution used by the bpmn-js modeler.
Better Examples
We've taken this move as an opportunity to rework and simplify some of our examples:
- A new starter example provides the modeler and viewer as simple HTML pages. This example effectively replaces our bpmn-js-seed project.
- Many examples, including colors or the url-viewer can now directly be opened and inspected without prior setup, too.
- The custom-bundle example (previously
custom-bower-bundle
) now showcases both the extension and bundling of a custom bpmn-js variant. - We've removed the
simple-bower
andsimple-commonjs
examples. The more succinct pre-packaged and bundling examples take their place (and will hopefully cause less confusion).
We hope that these adjustments make it easier to try out and dive into bpmn-js.
Other Changes
Two additional changes made it into this release:
FEAT
: be able to intercept thecontextmenu
event on shapesFIX
: correctly serialize colors set via modeling API
Wrapping up
Hopefully, our latest changes make it easier for people to integrate and play around with out toolkit. We look forward for many great single HTML page bpmn-js powered applications!
Get the latest release pre-packaged or as source code via npm or unpkg.
Are you passionate about JavaScript, modeling, and the web?
Join Camunda and build modeling tools people .