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⛳
- Coding conventions📐 and task automation🤖
- Contributing to the documentation
- Testing 🧪
- Issue tracking🙋🏽♂️
Assuming you already have Node installed on your machine💻 run the following commands in your working directory📁:
# 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
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
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 errorsgit push
as a pre-push hook.
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.
The library has full test coverage for every function on the public API using Jasmine
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.
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.
-
Fork the project
-
Clone your fork
-
Create a pr/feature branch
git checkout -b pr/feature
-
Commit your changes
git commit -m 'Added this feature'
-
Commit your changes
git push origin pr/feature
-
Open a pull request
Happy hacking 🚀!