This is a create-react-app application, that means all common CLI commands of this kind of app are available. Let's explain the ones which are most used on Prism daily development.
Not too much to say about this, we use NPM to handle project's dependencies.
Execute npm install
at root directory of this project to install all the required dependencies.
Also, we use NPM to compile and serve this application in our local environment, run npm run start
command to start with building and serving process, once this is done you'll see a local URL on you terminal, this URL is where the app will be served.
This project uses a Python-based backend, called Prism API, here is the documentation. If for some reason is required to change the API URL where Prism is pointing at, the file src/store/thunks/thunks.js
is in charge of building an instance of the API client, there you can change the url
key from the config.
In order to keep the code clean we use ESLint among Airbnb config and React app config both of them are applied automatically by using nmp run lint
command which will display a list with details about all found linter errors,
there might be some issue that can be resolved automatically by the linter using npm run lint -- --fix
command.
React testing library is used to mange/run unit testing, in order to run all tests of the project use npm run test
command.
There are another useful commands:
npm run test <ComponentName>
We must accomplish at least 80% of test coverage for our code, in order to execute a coverage test use npm run test:coverage