2017-09-26 09:50:51 +00:00
# How to Contribute
2015-04-01 11:31:22 +00:00
2017-09-26 09:50:51 +00:00
Great to see you! Help us out by [filing bugs or feature requests ](#working-with-issues ), assisting others in our [forums ](https://forum.bpmn.io/ ) or by [contributing improvements ](#contributing-improvements ).
2015-04-01 11:31:22 +00:00
2017-09-26 09:50:51 +00:00
## Table of Contents
2015-04-01 11:50:32 +00:00
2017-09-26 09:50:51 +00:00
* [Working with Issues ](#working-with-issues )
* [Creating an Issue ](#creating-an-issue )
* [Helping out ](#helping-out )
* [Contributing Improvements ](#contributing-improvements )
* [Setting up the Project locally ](#setting-up-the-project-locally )
* [Discussing Code Changes ](#discussing-code-changes )
* [Creating a Pull Request ](#creating-a-pull-request )
2015-04-01 11:50:32 +00:00
2017-09-26 09:50:51 +00:00
## Working with Issues
We use our [issue tracker ](https://github.com/bpmn-io/bpmn-js/issues ) for project communication, discussion and planning.
### Creating an Issue
Help others to understand your request:
* Be clear whether you [file a bug ](#reporting-a-bug ) or [suggest a new feature/improvement ](#suggesting-a-feature )
* Be descriptive when reporting (what, where, when and how)
#### Reporting a Bug
Help us to understand and reproduce your issue:
* Attach your environment (browser, bpmn-js version)
* Attach steps to reproduce
* Attach code samples, configuration options or stack traces that provide the necessary context
2017-09-26 12:47:23 +00:00
If possible, try to build an example that reproduces your problem. You can use our playgrounds for [viewer ](https://jsfiddle.net/kxqy09gf/ ) or [modeler ](https://jsfiddle.net/08p147e9/ ) as a starting point or put a demo up on [GitHub ](https://github.com/ ) for inspection.
2017-09-26 09:50:51 +00:00
#### Suggesting a Feature
* Provide the necessary context that allows us to understand how your proposal improves our library
### Helping out
* Share your perspective on issues
2015-04-01 11:50:32 +00:00
* Be helpful and respect others when commenting
2017-09-26 09:50:51 +00:00
## Contributing Improvements
2015-04-01 11:50:32 +00:00
2017-09-26 09:50:51 +00:00
Learn how to setup the project locally, make changes and contribute bug fixes and new features through pull requests.
### Setting up the Project
2015-04-01 11:50:32 +00:00
The project development runs on top of the [diagram-js ](https://github.com/bpmn-io/diagram-js ) master branch. The following code snippet sets up both libraries linking diagram-js to bpmn-js.
2017-09-26 09:50:51 +00:00
2015-04-01 11:31:22 +00:00
mkdir bpmn.io
cd bpmn.io
git clone git@github.com:bpmn-io/diagram-js.git
(cd diagram-js & & npm i)
git clone git@github.com:bpmn-io/bpmn-js.git
(cd bpmn-js & & npm install & & npm link ../diagram-js)
2017-09-26 09:50:51 +00:00
2015-04-01 11:31:22 +00:00
// Run the test suite
2017-09-26 09:50:51 +00:00
npm test
2015-04-01 11:31:22 +00:00
// Running the test suite with every file change
2017-09-26 09:50:51 +00:00
TEST_BROWSERS=(Chrome|Firefox|IE) npm run dev
### Discussing Code Changes
2015-04-01 11:31:22 +00:00
2017-09-26 09:50:51 +00:00
Create a [pull request ](#creating-a-pull-request ) if you would like to have an in-depth discussion about some piece of code.
2015-04-01 11:31:22 +00:00
2017-09-26 09:50:51 +00:00
### Creating a Pull Request
We use pull requests for feature additions and bug fixes. If you are not yet familiar on how to create a pull request, [read this great guide ](https://gun.io/blog/how-to-github-fork-branch-and-pull-request ).
2015-04-01 11:31:22 +00:00
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
2017-09-26 09:50:51 +00:00
* The `npm run all` build passes (executes tests + linting)
2015-04-01 11:31:22 +00:00
* The work is combined into a single commit
* The commit messages adhere to our [guideline ](https://docs.google.com/document/d/1QrDFcIiPjSLDn3EL15IJygNPiHORgU1_OOAqWjiDU5Y )
2015-04-01 11:50:32 +00:00
We'd be glad to assist you if you do not get these things right in the first place.
2017-09-26 09:50:51 +00:00
:heart: from the bpmn.io team.