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.
First, clone this repository.
git clone https://github.com/styfle/packagephobia
cd packagephobia
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
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"
Install Vercel CLI
npm install -g vercel
Run the development environment
vercel dev
Now the web app should be available at http://localhost:3000
Make sure the tests are passing.
npm run test
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.
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