/het-frontend

Primary LanguageTypeScriptMIT LicenseMIT

het-frontend

The frontend codebase for Health Equity Tracker.

Developer Instructions

Code in the app/ directory was bootstrapped with Create React App. In that directory you can run various npm scripts, which are described below.

You can learn more in the Create React App documentation.

To learn React, check out the React documentation.

Note: The following instructions assume running all commands from the app/ directory.

Install

Change directories to the app/ directory, then install dependencies using NPM.

Note: you will need a compatible verison of Node.JS and NPM installed locally. See the "engines" field in app/package.json for the required / minimum versions of each. It's recommended to use Node Version Manager (nvm) if you need to have multiple versions of Node.JS / NPM installed on your machine.

cd app && npm install

Trouble-shooting

If you encounter errors during install that mention gyp, that refers to a Node.js native addon build tool that is required for some modules. Follow the instructions on the gyp github repo for installation and setting up required dependencies (eg Python and certain build tools like XCode Command Line Tools for OS X).

Develop

To run the app in development mode, start a local web server, and watch for changes do:

npm start

The site should now be visible at localhost:3000. Any changes to source code will cause a live reload of the site.

Tests

To run unit tests do:

npm test

This will run tests in watch mode, so you may have the tests running while developing.

Build

To create a "production" build do:

npm run build

This should output bundled files in the app/build/ directory. Use these files for hosting the web app.

Ejecting Create React App

Note: this is a one-way operation. Once you eject, you can’t go back!

If you aren’t satisfied with the Create React App build tool and configuration choices, you can eject at any time. This command will remove the single build dependency from your project.

Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except eject will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.

You don’t have to ever use eject. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.

License

MIT