First of all thanks for the interest in contributing to Muuri! Here you will find some instructions on how to create an issue or a pull request.
First of all you should check out the existing questions and see if your question has been asked/answered already. If not, you can create a new issue and explain the problem you're facing.
Improvement ideas are always welcome! Please check first the existing ideas, features and enhancements so that you won't be creating a duplicate issue.
Please create an issue and explain the bug in detail. If possible create a reduced test case and share a link to it. You can, for example, fork this CodePen example and modify it to demonstrate the bug.
- Discuss first.
- The first step should always be creating a new issue and discussing your pull request suggestion with the authors and the community.
- After you get green light it's time to get coding.
- Fork the repo and create a new branch for your pull request.
- Fork Muuri.
- Create a new branch for your pull request from the master branch. The name of the pull request branch should start with the id of the issue you opened for the pull request, e.g.
#123-fix-something
.
- Setup the development environment.
- Install gulp-cli:
npm install gulp-cli -g
- Run
npm install
in the repository's directory. - You can now run the following gulp commands:
gulp
- Lint, compress and test
muuri.js
file. - This is the command you should execute successfully before opening the pull request.
- Lint, compress and test
gulp lint
- Makes sure
muuri.js
file conforms to the project's ESLint config.
- Makes sure
gulp compress
- Creates a minified version of
muuri.js
file asmuuri.min.js
.
- Creates a minified version of
gulp test
- Runs the unit tests in Sauce Labs.
- To make this work you need to create an
.env
file the project root, which should containSAUCE_USERNAME
andSAUCE_ACCESS_KEY
variables. - Launches chrome, firefox and safari by default.
- You can provide arguments to launch specific browsers:
gulp test --chrome --firefox --safari --edge
gulp test-local
- Runs the unit tests locally.
- Launches only chrome by default.
- You can provide arguments to launch specific browsers:
gulp test-local --chrome --firefox --safari --edge
- Install gulp-cli:
- Do the updates.
- Now is the time to make the actual updates to Muuri.
- Remember scope. Don't refactor things that are not related to the pull request.
- After you're done update unit tests and docs (
README.md
) if necessary. - Also, if this is your first pull request to Muuri remember to add yourself to the
AUTHORS.txt
file, e.g.John Doe <https://github.com/johndoe>
.
- Create
muuri.min.js
and make sure nothing is broken.- Run
gulp
successfully and try to do some manual testing if possible.
- Run
- Create the pull request.
- Do your best to explain what the pull request fixes.
- Mention which issue(s) will be closed by the pull request, e.g.
Closes #123
. - Request a review from @niklasramo
- After your pull request is accepted it will be merged to the dev branch and released with the next release. If you did only some minor change in the documentation it may be merged directly to the master branch.
- You made it! Thank you so much for contributing to Muuri!