Skip to content

Latest commit

 

History

History
124 lines (74 loc) · 4.61 KB

CONTRIBUTING.md

File metadata and controls

124 lines (74 loc) · 4.61 KB

How to Contribute

Great to see you! Help us out by filing bugs or feature requests, assisting others in our forums, or contributing improvements.

Table of Contents

Work with Issues

We use our issue tracker for project communication, discussion, and planning.

Create an Issue

File bug reports or feature requests via our issue tracker. Please mind the existing issue templates. These guide you and ensure you provide the details needed for us to follow up on your issue.

Help Out

  • Share your perspective on issues
  • Be helpful and respect others when commenting

Contribute Improvements

Learn how to set up the project locally, make changes, and contribute bug fixes and new features through pull requests.

Setup the Project

The project development runs on top of the diagram-js master branch. The following code snippet sets up both libraries linking diagram-js to bpmn-js.

mkdir bpmn.io
cd bpmn.io

git clone [email protected]:bpmn-io/diagram-js.git
(cd diagram-js && npm i)

git clone [email protected]:bpmn-io/bpmn-js.git
(cd bpmn-js && npm install && npm link ../diagram-js)

For details consult our in depth setup guide.

Build and Run the Project

Spin up a single modeler instance for local inspection:

npm start

Spin up the development environment, re-run tests with every file change:

npm run dev

You may also run against different browsers:

TEST_BROWSERS=Firefox,Safari npm run dev

Build, lint, and test the project, just as the CI does.

npm run all

Discuss Code Changes

Create a pull request if you would like to have an in-depth discussion about some piece of code.

Adhere to the Code Style

In addition to our automatically enforced lint rules, please adhere to the following conventions:

  • Use modules (import / export (default))
  • Do NOT use ES language constructs (class, const, ...) in sources

Rationale: People should be able to consume parts of the library with an ES module aware bundler such as Webpack or Rollup without the need to use a transpiler such as Babel.

Adhere to the Unit Test Style

In order to retrieve a sign-off for your contribution, it needs to be sufficiently and well tested. Please structure your unit tests into given, when and then (ModelerSpec example, ResizeBehaviorSpec example). To increase overall readability and understandability please also leave two empty lines before describe(...), it(...) or setup blocks on the same indentation level (ModelerSpec example, ResizeBehaviorSpec example).

Create a Pull Request

We use pull requests for feature additions and bug fixes. If you are not yet familiar with pull requests, read this excellent guide.

Some things that make it easier for us to accept your pull requests

  • The code adheres to our conventions
    • spaces instead of tabs
    • single-quotes
    • ...
  • The code is tested
  • The npm run all build passes (executes tests + linting)
  • The work is combined into a single commit
  • The commit messages adhere to the conventional commits guidelines

We'd be glad to assist you if you do not get these things right in the first place.


Thanks for your interest in our library.

❤️ from the bpmn.io team.