sv-component-library-2 v1.0.6
Code practices and NPM modules used
In this project, the main npm
modules used are
- React 16.9+
- Typescript
- Prettier + ESlint for TypeScript
- Jest + React Testing Library
- styled-components
Pre-Requirements
You can embed this key as a custom environment variable inside the following files:
- .env
- .env.test
Your can read more on embedding custom environment variables here (https://create-react-app.dev/docs/adding-custom-environment-variables)
Install
Close the project using the following command:
git clone https://github.com/alonfai/CodingTest
yarn install
Available Scripts
In the project directory, you can run:
yarn start
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.
yarn test
Launches the test runner in the interactive watch mode.
yarn lint
Runs the linter ESLint & Prettier on the staged files
yarn update
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
yarn coverage
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 build
folder.
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"