-
Notifications
You must be signed in to change notification settings - Fork 275
Contributing
Dave Irvine edited this page Apr 17, 2016
·
7 revisions
There are a few steps to take to get twig.js building in your environment.
In order work on twig.js you will need node installed to run the tests and create the minified version of twig.js
- Fork and clone the twig.js git repository
- Run
npm install
to install the development dependencies - Make your changes to the source files in
src/
- Add/update tests in
test/
- Run
npm test
to make sure your tests pass. - Run
npm build
to build the source.
- If possible, create tests (in the
test/
directory) which test your changes. E.g. if you found and fixed a bug, create a test which fails in the buggy version. - Please commit only changes in the source code, not in the built files like
twig.js
,twig.min.js
, etc. as they blow up the repository and create conflicts when merging pull requests. We build a final file when releasing a new version. - If possible, rebase your changes to the current master.
- Tidy up your commit history. I think it's important to have distinct commits, so that you can follow development process, but readability suffers from too many commits just fixing stuff.
- Push a branch to your fork on Github, create a pull request there.