Code practices and NPM modules used
In this project, the main
npm modules used are
- React 16.9+
- Prettier + ESlint for TypeScript
- Jest + React Testing Library
You can embed this key as a custom environment variable inside the following files:
Your can read more on embedding custom environment variables here (https://create-react-app.dev/docs/adding-custom-environment-variables)
Close the project using the following command:
git clone https://github.com/alonfai/CodingTest yarn install
In the project directory, you can run:
Runs the app in the development mode. Open http://localhost:3000 to view it in the browser.
The page will reload if you make edits. You will also see any lint errors in the console.
Launches the test runner in the interactive watch mode.
Runs the linter ESLint & Prettier on the staged files
Updates the version of the library with a
patch release, and adds a new tag and commit message and pushes it to the remote repository
Launches the Jest test runner in coverage mode. It has an integrated coverage reporter that works well with ES6 and requires no configuration.
yarn run build
Builds the app for production to the
It correctly bundles React in production mode and optimizes the build for the best performance.
The build is minified and the filenames include the hashes.
"preinstall": "node tools/preinstall-script.js", "start": "node scripts/start.js", "build": "node scripts/build.js", "test": "node scripts/test.js", "version": "version patch", "lint": "lint-staged", "coverage": "npm test -- --coverage --watchAll=false"