Skip to content

Latest commit

 

History

History
84 lines (47 loc) · 3.13 KB

contributing.md

File metadata and controls

84 lines (47 loc) · 3.13 KB

Contributing to Pencil.js

First of all, welcome and thanks for taking the time to contribute. 👍

Code of conduct

This project and everything about it is ruled by our code of conduct. Everyone is expected to follow those simples rules. If you see unacceptable behavior, be sure to report it to guillaume.martigny@gmail.com.

How to contribute

Report bugs

The easiest way to help us, is by reporting anything fishy about Pencil.js with a new issue. But first, be sure to check if it's not already on the list of known bugs.

Following our issue template allow for a better understanding and a quicker resolution.

Suggesting features

We are eager to listen to the users, so if you feel like something missing or not working as you expect, you can fill a feature request. As always, take a look first at the list of requests and upvote what you want most.

Code contribution

You want to get your hands dirty ? Good 😉

Here's a few steps to guide you.

Setup

You need to fork the repo to make a copy for you. Then you can clone this copy to your machine.

git clone git@github.com:your-name-here/pencil.js.git
cd pencil.js

We use lerna to manage the modular aspect of the project. So, you just have to run the init script.

npm run init

Coding

You can then start to make modification to the code. Here's a few useful commands.

To build the project, you can simply run the build script once or ask it to run at each modifications you make.

npm run build
# or
npm run build -- --watch

In the playground directory, you'll find a basic HTML page pointing to the build file. You can then mess with the result to see your modifications in actions.

Check

In order for everyone to work in harmony, we have a few guidelines.

We use eslint to check the code-style. Configure your IDE to follow the code-style or run the linting script.

npm run lint

There's a test file for each modules. You can run all the tests with the test script.

npm test

Committing

Once you're done editing the code, checking you forget no lint and running the tests successfully, you can create your pull request.

Commit your code, part by part, using meaningful commit message with git.

git commit -m "Some description" file1 file2 ...

When no changes are left, you can push it online.

git push

On your fork at https://github.com/your-name-here/pencil.js, you should see a button to create a new pull request. Once you've clicked it, confirm the committed files and add a clear title and message linking to the issue or feature.

Finally, we'll review your code and eventually give you feedback.

If everything goes well, you'll be an official contributor of pencil.js ! ✌️