Skip to content

Latest commit

 

History

History
109 lines (66 loc) · 3.85 KB

contributing.md

File metadata and controls

109 lines (66 loc) · 3.85 KB

Contributing 💙

Thank you 😄 for contributing to this project. Follow the steps below to get started with the part of the project you wish to contribute to.

Setup⛳

Assuming you already have Node installed on your machine💻 run the following commands in your working directory📁:

Cloning the repository

# Creating our working directory
mkdir huetiful && cd huetiful

On this step its a matter of preference💁🏽‍♂️ to either use git clone for cloning the repository (personally, I prefer npx degit because it is simpler):

#  Cloning the repository. It will populate your current working directory with all the files in the repository
npx degit prjctimg/huetiful

Installing dependencies

Install the necessary dependencies📦 needed to setup the development environment and then run the build👷🏾‍♂️ script to have the current builds added to a lib/ folder

npm install --save-dev

Coding conventions📐 and task automation🤖

This project uses Husky🐶 for Git hooks. For example, the code can only be committed if it passes linting tests which are done using 🧐ESLint. For the code to be pushed to the remote branch it must build without errors‼️ on your local machine. This helps reduce chances of introducing buggy🐞 code in the project. All code is automatically formatted using Prettier when you run git push as a pre-push hook.

Contributing to the documentation

The API documentation is compiled from .d.ts files in the types/ directory using TypeDoc and typedoc-plugin-markdown. This is then converted to HTML pages with various tweaks. Check out the docs/assets to see all the resources used to build the docs.

Testing 🧪

The library has full test coverage for every function on the public API using Jasmine

Adding a test/ Running tests

To run tests simply type this into your terminal:

npm test

If you wish to add or inspect the test files go to spec and open the module you want. A test file has a .spec.js suffix. Each test file has a data object which has the function name as key for an object containing parameters as an array, description and the expected value. This makes it easy to extend tests for future functions and keeps the spec files as DRY as possible.

Tests must pass before a package is deployed on NPM.

Issue tracking🙋🏽‍♂️

Our issues are partly managed by GitHub Actions. For example when you open a new issue an automated🤖 response is sent to you telling you how to proceed🚦. You can also self assign yourself an issue or task if you want to work on it👐🏾. This helps other maintainers focus on improving other aspects of the project.

Pull Requests

  1. Fork the project

  2. Clone your fork

  3. Create a pr/feature branch

    git checkout -b pr/feature
  4. Commit your changes

    git commit -m 'Added this feature'
  5. Commit your changes

    git push origin pr/feature
  6. Open a pull request

Happy hacking 🚀!