Skip to content

Latest commit

 

History

History
117 lines (72 loc) · 1.89 KB

README.md

File metadata and controls

117 lines (72 loc) · 1.89 KB

React JS Boilerplate

Guide

Install Dependencies

npm install

Environment Variables

All environment variables for react application must start with APP_ prefix

To change env prefix change add or remove string from envPrefix variable in vite.config.json

Environtment variables can be accesed using env.<name> or import.meta.env.<name>. Prefix must be included.

Declare env types in src/env.d.ts in ImportMetaEnv interface

The environment variables can be found and modified in the .env file. See .env for default values.

In the project directory, you can run:

Start

Start development build.

npm start

Build

Type check and build for production.

npm run build

Preview

Preview production build.

npm run preview

Clean

Removes all the files generated by the build process.

npm run clean

Lint Check

Finds linting errors.

npm run lint:check

Lint Fix

Fix linting errors.

npm run lint:fix

Prettier Check

Check the code formatting.

npm run prettier:check

Prettier Fix

Fix the code formatting.

npm run prettier:fix

Types Check

Check Typescript types.

npm run types:check

Check

Check linting, code formatting, Typescript types.

npm run check

Fix

Fix linting, code formatting, and check Typescript types.

npm run fix

Notes