$ gnpm install bpmn-js-cli
As of version
1.0.0this library exposes ES modules. Use an ES module aware bundler such as Webpack or Rollup to bundle it for the browser.
An extensible command line interface for bpmn-js.
Checkout demo.js for the commands powering this demo.
Out of the box, the cli supports the following commands:
append source type [deltaPos]connect source target typecreate type position parentelement idelementsmove shape delta [newParentId]undoredosave svg|bpmnsetLabel element labelsetRoot element|elementIdremoveShape shape|elementIdremoveConnection connection|connectionIdGet the list of available commands:
cli.help();
Get the list of elements:
cli.elements();
Export SVG or BPMN 2.0 xml
cli.save('svg' || 'bpmn');
Deploy the cli with bpmn-js:
var BpmnModeler = require('bpmn-js/lib/Modeler'),
CliModule = require('bpmn-js-cli');
var modeler = new BpmnModeler({
container: document.body,
additionalModules: [
CliModule
],
cli: {
bindTo: 'cli'
}
});
modeler.importXML('some-bpmn-xml')
.then(({ warnings }) => {
// ...
})
.catch(err => {
console.error(err);
});
Access the cli as cli in your developer console (open via F12 in most browsers).
Use the cli to model BPMN 2.0 diagrams in your browser. Pain free.
MIT
Copyright 2013 - present © cnpmjs.org | Home |