Skip to content

kienkhang/react-ts

Repository files navigation

Features

Another Features

Project structure

src folder in here:

  • apis Call REST APIS
  • assets Images, icons
  • components React Component
  • hooks React hooks
  • constants Constant Data
  • locales Internationalization
  • layouts Based layout
  • pages Based page
  • routers React Router
  • styles Css
  • types Type, inteface, enum
  • utils Typescript helper libraries

Project setup and usage

Install nodeJS

Latest node LTS version required (16) Use node manager like nvm to install.

Install pnpm: https://pnpm.io/installation

Install dependencies:

pnpm install
pnpm i

Run development server:

pnpm dev

Build and preview built site locally:

pnpm preview

Build:

pnpm build

Lint .ts files with eslint:

pnpm lint

Git commit specification reference

  • feat add new functions
  • fix Fix issues/bugs
  • perf Optimize performance
  • style Change the code style without affecting the running result
  • refactor Re-factor code
  • revert Undo changes
  • test Test related, does not involve changes to business code
  • docs Documentation and Annotation
  • chore Updating dependencies/modifying scaffolding configuration, etc.
  • workflow Work flow Improvements
  • ci CICD
  • types Type definition
  • wip In development