1.9 KiB
1.9 KiB
Contributing
As granim.js
is a small project with a few maintainers,
we'd like to make sure that it's easy for you to contribute,
and that it's easy for us to manage incoming PRs. In that interest -
- Fork the Repo
- Clone
- Run
npm install
- Add test cases and make changes to pass those tests
- You can also test your modifications with the
test/
folder - Run
gulp
orgulp watch
to build / watch the lib. Usegulp buildDoc
orgulp watchDoc
to build / watch the docs - Run
npm start
and checklocalhost:8080
to access the doc locally, everything should be working after your changes - Run
npm test
and make sure the tests pass - Commit the source and the built files and Push
- Open a Pull Request
Before you commit
- If you modified the lib:
- Run
gulp
and commit the modifications and the built lib (dist/granim.js
,dist/granim.min.js
,docs/assets/js/vendor/granim.min.js
) - Run
npm test
to make sure you past test cases. Please add test cases for your new code
- If you modified the docs:
- Use the
docs/assets/pug/*.pug
to modify the HTML of the docs, and commit the .pug and .html built file - For .js and .css modifications, commit the source and the built files
Please commit your modifications with a clear message of what you changed/added. The sources and the built files should be in the same commit.
Guidelines
We'd like to make sure your code is like our:
'use strict';
- Use semicolons
;
- We prefer
'
to"
- Use 1 tab for indentation, no spaces
- The lib is coded in ES5, for code consistency, don't use ES6 please
With all of that, you should have a PR submitted and merged in no time.
Thanks for helping us out! :)
Test
Run npm test
We have CI and code coverage set up for the project, and testing is very important to us. We want to make sure your contributions help everyone without hurting them