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 redis labs.
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_HOST="localhost"
REDIS_PORT="6379"
REDIS_PASS="SomePass42"
GA_ID=""
# optional settings
export PORT="3000"
export NPM_REGISTRY_URL="https://registry.npmjs.com"
Make sure you have the ZEIT Now cli installed with npm install -g now
.
now dev
Now the web app should be available at http://localhost:3000
Make sure the tests are passing.
npm test
The code is deployed to ZEIT Now via GitHub Integration.
If you want to deploy from the command line, you'll need the now
cli. Run npm install -g now
to get it.
Then you can simply run now
and the code will 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