Giter Site home page Giter Site logo

bpmn-js-cli's Introduction

As of version 1.0.0 this library exposes ES modules. Use an ES module aware bundler such as Webpack or Rollup to bundle it for the browser.

bpmn-js-cli

CI

An extensible command line interface for bpmn-js.

Demo

Checkout demo.js for the commands powering this demo.

Features

  • Model BPMN 2.0 diagrams in the browser, without a mouse
  • Full undo and redo functionality
  • Extensible through your own commands
  • Numerous built-in commands

Built in Commands

Out of the box, the cli supports the following commands:

  • append source type [deltaPos]
  • connect source target type
  • create type position parent
  • element id
  • elements
  • move shape delta [newParentId]
  • undo
  • redo
  • save svg|bpmn
  • setLabel element label
  • removeShape shape|elementId
  • removeConnection connection|connectionId

Quickstart

Get the list of available commands:

cli.help();

Get the list of shapes:

cli.shapes();

Export SVG or BPMN 2.0 xml

cli.save('svg' || 'bpmn');

Usage

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.

License

MIT

bpmn-js-cli's People

Contributors

nikku avatar dependabot[bot] avatar pedesen avatar barmac avatar maxtru avatar philippfromme avatar ricardomatias avatar iso50 avatar hawky-4s- avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.