Skip to content

nypublicradio/gothamist-vue3

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Gothamist Web Client

Setup

Requirements:

node version 18

Create .npmrc file

To install our nypr-design-system dependency you need to create a personal access token through Github and add it to a local .npmrc file.

Create a personal access token in Github under Settings -> Developer settings -> Personal access tokens -> Tokens (classic). You will need to give your token the read:packages permission.

Copy the sample .npmrc file to a local version (will be .gitignore'd),

cp .npmrc.sample .npmrc

and add your token to the end of line 2 of .npmrc.

Setup git hooks (optional)

Set up a pre-commit hook to run eslint with autofix before each commit

npx simple-git-hooks

Recommended VS Code plugins:

Vue Language Features (Volar) TypeScript Vue Plugin (Volar) ESLint

This project uses antfu/eslint-config, follow the instructions there to setup your VSCode to autoformat and fix errors

Development

Start the development server on http://localhost:3000

npm run dev

Run linter and tests

npm run test

If linter fails you can try to autofix errors

npm run lint:fix

Production

Build the application for production:

docker build -t gothamist-vue3 .
docker run -p 3000:3000 -e HOST=0.0.0.0 gothamist-vue3 -e API_URL=https://api.demo2.wnyc.net