Skip to content
This repository has been archived by the owner on Sep 14, 2023. It is now read-only.

Latest commit

 

History

History
108 lines (69 loc) · 4.98 KB

CONTRIBUTING.md

File metadata and controls

108 lines (69 loc) · 4.98 KB

Contributing

A healthy community is a contributing community, and contributions are appreciated and welcome with open hearts and open fingers. If you haven't done so already, please review the README.md since this text only covers the commit conventions and how to install/test.

Pull Requests + Commit Conventions

  1. Fork the repository.

    git clone https://github.com/<your-username>/documentation.git
    cd documentation
    git remote add upstream https://github.com/ctr-lang/documentation.git
  2. Install the dependencies. Make sure you have yarn installed.

    yarn install
  3. Create a new branch to contain your feature, change, or fix.

    git checkout -b <topic-branch-name>
  4. Commit your changes in logical chunks.

    • To keep commits uniform, this project uses commitizen, but don't worry if you've never heard about commitizen or don't know how to use it. Everything is pre-configured and ready for you to rock 'n' roll out of the box. Just follow these simple steps:
      1. Make your update/change/fix
      2. Add your changes git add .
      3. Run: npm run commit - An interactive command prompt will appear and lead you step-by-step through the whole process. It's easy peasy lemon squeezy so don't worry about a thing.
    • If commitizen does not work or for some extraneous reason you wish not to use it your commit must follow the angular commit format: <type>(<scope>): <subject> → #<closes>. Otherwise, your pull request will fail during approval, but it’s highly encouraged you use npm run commit to make everyone's life just a bit easier.
  5. Test changes.

    yarn run test
  6. Locally merge (or rebase) the upstream development branch into your topic branch.

    git pull [--rebase] upstream master
  7. Push your topic branch up to your fork.

    git push origin <topic-branch-name>
  8. Open a Pull Request with a clear title and description against the master branch. Suggestions, changes, or improvements may be required for your changes to be merged, but small pull requests should be accepted quickly. Ideally, your pull request meets the four pillars of quality:

    1. Update/change/fix has test(s)
    2. Follows the existing code style
    3. Has decent commit message(s)
    4. Commit, and code comes with a smile

Setup

First, make sure you have yarn installed.

Install

  cd documentation
  yarn install

Development

While this repository does not have the custom CSS and Javascript to make it look like docs.ctr-lang.com that doesn't mean you can't server the docs locally using MkDocs. But to do so you must first ensure you have MkDocs installed and the Material theme installed as well. Additionally, depending on your current system you may have to install some other auxiliary markdown extensions such as, SmartyPants, Table of Contents, Sane Lists, markdown-include, Attribute Lists.

  mkdocs serve

Test

  yarn test

Commits

To keep commits uniform, this project uses commitizen, but don't worry if you've never heard about commitizen or don't know how to use it. Everything is pre-configured and ready for you to rock 'n' roll out of the box. Just follow these simple steps:

  1. Make your updates/changes/fixes
  2. Add your changes git add .
  3. Run: yarn run commit - An interactive command prompt will appear and lead you step-by-step through the whole process. It's easy peasy lemon squeezy so don't worry about a thing

Submitting Changes

Once your commit(s) are made, push to your fork, and submit a pull request. Suggestions, changes, or improvements may be required for your changes to be merged, but small pull requests should be accepted quickly. Ideally, your pull request meets the four pillars of quality:

  1. Has test(s)
  2. Follows the existing code style
  3. Has a decent commit message and accompanied documentation need be
  4. Comes with a smile

License

IMPORTANT: By contributing your code, you agree to license your contribution under the Attribution-ShareAlike 4.0 (CC BY-SA 4.0 US) license.