svg-sprite-loader is a free and open source, and we appreciate any help you're willing to give - whether it's fixing bugs, improving documentation, or suggesting new features.
Table of contents
Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.
If you have questions about how to use svg-sprite-loader, please read the docs and question issues first.
If you find a bug in the source code or a mistake in the documentation, you can help us by submitting an issue. But even better you can submit a pull request with a fix.
You can request a new feature by submitting an issue. If you would like to implement a new feature then follow the code contribution steps.
Please follow these steps to contribute effectively.
-
Fork & clone a repo (how to).
-
Add an upstream remote repo (original repository that we forked from):
git remote add upstream https://github.com/JetBrains/svg-sprite-loader.git
-
Keep your fork up to date:
git pull --ff upstream master
-
Setup project properly: now u need install nvm
sh scripts/build.sh
It will:
- Install project dependencies.
- Install git hooks.
- Install dependencies for testing in
webpack-1
andwebpack-2
environments. - Set
webpack-3
environment as current.
Don't use
yarn install
ornpm install
.
-
Make changes in a new git branch (don't use master!):
git checkout -b my-fix master
-
Lint your code to check it's following our code style:
yarn lint
Linter runs each time before the commit happens (via git hook).
-
Test your code in each environment (webpack-1 and webpack-2):
# It will run tests in webpack-1 & webpack-2 environments yarn test:all # Test only in webpack-2 yarn test:webpack-2
Test coverage is collected in each test run. If it decrease too much, tests will fails.
-
Commit your changes using a Angular commit convention:
# Run it when you have changes staged for commit yarn commit
Commit messages validated each time when commit happens.
-
Push your branch to GitHub:
git push origin my-fix
-
Create a pull request on GitHub (how to).
-
Cleanup after pull request is merged:
# Delete the remote branch on GitHub git push origin --delete my-fix # Check out the master branch git checkout master -f # Delete the local branch git branch -D my-fix
- Commits of type
fix
will trigger bugfix releases, e.g.0.0.1
. - Commits of type
feat
will trigger feature releases, e.g.0.1.0
. - Commits with
BREAKING CHANGE
in body or footer will trigger breaking releases, e.g.1.0.0
.
All other commit types will trigger no new release.