ProvidenceGeeks / website-frontend

UI frontend repository for the Providence Geeks website
https://www.pvdgeeks.org
7 stars 9 forks source link

website-frontend

Overview

UI frontend repository for the Providence Geeks website. Built with React and webpack.

Project Setup

  1. Make sure you have read the Frontend Onboarding docs here

Development

Runs the app in development mode. The page will automatically reload when changes are made, and you should see build errors and lint warnings in the console.

yarn develop

The page should open automatically, however if it doesn't the url is: http://localhost:9000.

Mobile Development and Testing

For testing from a mobile device

  1. Make sure your phone and device are on the same network
  2. Find the internal address of your machine, something like 192.168.x.y - OSX / Linux / Windows
  3. Run the develop task and pass a --host flag to webpack-dev-server, e.g. yarn run develop --host 0.0.0.0
  4. From your mobile device, open up the address in step two and the port, e.g. http://192.168.x.y:9000

Be aware that using address 0.0.0.0 opens up the host machine to be accessible from all IP addresses. Hence we avoid making this the default host unless explicitly needed.

Production

Creates a minified bundled build, and outputs to the build folder.

yarn build

Testing

Runs unit tests with jest

yarn test

For TDD (recommended for local development), add the watch flag

yarn test --watch

To generate coverage, use

yarn test --coverage

Demo

Run a production build locally

yarn serve

Release Management

Release management and procedure docs can be found in the wiki