This repository contains the react application frontend for the Rovercode web application.
nodejs LTS version v10.x or v12.x is required
yarn is required for installing dependencies. Instructions for installing yarn
can be found here.
To install the production dependencies (for just running the application), run:
yarn install --pure-lockfile --production
To install development dependencies (for running tests, lint, etc), run:
yarn install --pure-lockfile
NOTE: The application running the development webserver requires the rovercode api to be running at http://localhost:8000
To run the development web server using a locally running API instance, run:
yarn start:local
To run the development web server using the API instance on alpha.rovercode.com, run:
yarn start:alpha
To run unit tests, run:
yarn test
To debug the tests in VS Code, use these run configurations in your launch.json:
{
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Jest All",
"program": "${workspaceFolder}/node_modules/.bin/jest",
"args": [
"--runInBand"
],
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen",
"disableOptimisticBPs": true,
"windows": {
"program": "${workspaceFolder}/node_modules/jest/bin/jest",
}
},
{
"type": "node",
"request": "launch",
"name": "Jest Current File",
"program": "${workspaceFolder}/node_modules/.bin/jest",
"args": [
"${fileBasenameNoExtension}"
],
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen",
"disableOptimisticBPs": true,
"windows": {
"program": "${workspaceFolder}/node_modules/jest/bin/jest",
}
}
]
}
To run the linter, run:
yarn lint