First and foremost, thanks for contributing to can-fixture and CanJS! If you have any questions, reach out to us on Slack (#canjs channel).
The following details how to make contributions such as:
- reporting bugs
- suggesting features
- contributing code, including:
Report a bug as a new GitHub issue.
When filing a bug, it is extremely helpful to include:
- A small example with JS Bin.
- Breaking tests (optional)
- Proposed solutions (optional)
Please be as descriptive as possible and use as little code as possible to simulate the error.
Report a feature request as a new github issue.
- fork can-fixture
- clone it
- install dependencies with
npm install
At this point you should be able to open test/test.html and see everything passing. You may need
to host the can-fixture folder. The http-server
package makes this easy.
fixture.js- assembles all the other files into the final API.core.js- methods for adding, removing, and matching fixtures with AJAX requests.xhr.js- mock XHR object that can send requests to a fixture.store.js- provides a restful mock service layer.build.js- builds the AMD and<script>based files.package.json- lists all package dependencies and maintenance scripts.helpers/- helper functionality.test/- tests.
Run:
> npm test
coming soon, but github makes it easy
- Make sure you have access to the
can-fixturenpm repository. - Make sure you have the latest master checked out (which should have all changes merged in)
Run:
> npm run release:patch
You can substitute patch with minor or major.
If something breaks during the release, you may need to restore your environment by:
Making sure you are in the master branch and there is no release branch:
> git checkout master
> git branch -D release
Make sure any tag that got released is deleted
> git tag -d VERSION
> git push origin :refs/tags/VERSION