@process-engine/bpmn-js-custom-bundle

This project creates a bundle of the bpmn.io components.

Usage no npm install needed!

<script type="module">
  import processEngineBpmnJsCustomBundle from 'https://cdn.skypack.dev/@process-engine/bpmn-js-custom-bundle';
</script>

README

bpmn-js custom bundle

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.

The bundle is created with rollup.js.

What are the goals of this project?

Motivation: We created this project to solve a bundling issue, when using Aurelia and bpmn-js there are some dependencies that cannot be resolved. For example some parts of bpmn-js 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.

Now this package bundles the JS and CSS of:

It is used by the BPMN Studio.

Relevant URLs

How do I set this project up?

Prerequesites

  • Node latest LTS

Setup/Installation

$ npm install

Building

$ npm run build

This creates all bundled files in the dist folder.

How do I use this project?

Usage

$ 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';

Authors/Contact information