Skip to content

Latest commit

 

History

History
87 lines (57 loc) · 2.21 KB

CONTRIBUTING.md

File metadata and controls

87 lines (57 loc) · 2.21 KB

Contributing

Thanks for your interest in the project!

Requirements

Requirements to install and run:

Installation

Install the dependencies:

npm install

Then run the program:

node static-dodo [options]

Workflow

To make a change, please use the following GitHub workflow:

  1. Fork this repo on GitHub.
  2. Clone your forked repo to your local machine: git clone https://github.com/{your username}/static-dodo
  3. Create a new branch off of the main branch: git checkout -b {new branch name} main
  4. Make your changes and save.
  5. Check to see which files have changed: git status
  6. Stage these changed files in git: git add file1 file2 ...
  7. Commit your changes: git commit -m "Made the following changes..."
  8. Push your commits and branch to your GitHub fork: git push origin {new branch name}
  9. create a Pull Request on GitHub.
  10. Add a description about what you changed and submit.

Code format

The project uses prettier to have a common format for all source code. If you use VS Code prettier will be run every time you save a file.

You can run the following to run prettier from the terminal:

npm run prettier

or to avoid overwriting files you can check if the files are already formatted:

npm run prettier-check

Code linting

The project uses ESLint to find mistakes in the code.

You can run the following to run ESLint from the terminal and show the errors:

npm run eslint

or to fix the errors that ESLint knows how to fix:

npm run eslint-fix

Code Testing

This project uses Vitest for testing. You can run all the tests with the command:

npm test

To run a specific test (for example for file name foo.js):

npm test foo

Tests are found in files that end in .test.js. You can follow the Vitest docs for the basics on how to to get started writing tests.