node version 18
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
.
Set up a pre-commit hook to run eslint with autofix before each commit
npx simple-git-hooks
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
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
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