Skip to content

Latest commit

 

History

History
79 lines (49 loc) · 1.71 KB

CONTRIBUTING.md

File metadata and controls

79 lines (49 loc) · 1.71 KB

Contributing

Thank you for considering contributing to Package Phobia!

The goal of this project can be found in the README.md so this document will focus on building, running, and testing the code.

Getting Started

First, clone this repository.

git clone https://github.com/styfle/packagephobia
cd packagephobia

Redis

You will need to run redis either locally or in the cloud such as upstash.com.

If you have docker, you can get started quickly with the following command.

docker run -p 6379:6379 redis

Env

Create a .env file in the root directory.

# required settings
REDIS_URL="redis://127.0.0.1:6379"

# optional settings
PORT="3000"
NPM_REGISTRY_URL="https://registry.npmjs.com"

Running the code

Install Vercel CLI

npm install -g vercel

Run the development environment

vercel dev

Now the web app should be available at http://localhost:3000

Testing the code

Make sure the tests are passing.

npm run test

Deploying the code

Each PR is automatically deployed to Vercel via the GitHub Integration.

If you want to deploy from the command line, you'll need to install Vercel CLI with npm i -g vercel.

Then you can simply run vercel to deploy.

Submitting a PR

Wow you're doing great! Before you submit a Pull Request, please create an issue so that we can discuss the problem you are solving. When we're all on the same page, make sure you test the code and prettify the code. And please add additional tests if possible.

npm run test
npm run prettier