Skip to content

Latest commit

 

History

History
131 lines (90 loc) · 3.78 KB

CONTRIBUTING.md

File metadata and controls

131 lines (90 loc) · 3.78 KB

Contributing

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

Code of conduct

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.

What's up?

Got a question or problem with setup?

If you have questions about how to use svg-sprite-loader, please read the docs and question issues first.

Found a bug or inconsistency?

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.

Want a feature?

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.

Code contribution

Please follow these steps to contribute effectively.

Setup

  1. Fork & clone a repo (how to).

  2. Add an upstream remote repo (original repository that we forked from):

    git remote add upstream https://github.com/JetBrains/svg-sprite-loader.git
  3. Keep your fork up to date:

    git pull --ff upstream master
  4. Setup project properly: now u need install nvm

    sh scripts/build.sh

    It will:

    1. Install project dependencies.
    2. Install git hooks.
    3. Install dependencies for testing in webpack-1 and webpack-2 environments.
    4. Set webpack-3 environment as current.

    Don't use yarn install or npm install.

Develop

  1. Make changes in a new git branch (don't use master!):

    git checkout -b my-fix master
  2. Lint your code to check it's following our code style:

    yarn lint

    Linter runs each time before the commit happens (via git hook).

  3. 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.

  4. 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.

  5. Push your branch to GitHub:

    git push origin my-fix
  6. Create a pull request on GitHub (how to).

  7. 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

Releasing

  • 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.