Skip to content

jameshsu1125/template-vite-react

Repository files navigation

NPM NODE React TS LESS TW ROUTER

Logo

Logo

Short description

Table of contents

Quick start

  • install module
$ npm i
  • create .env file
touch src/pages/.env
  • copy variables to .env file.
VITE_MOCKING=false
VITE_API_PATH='./api'

VITE_TITLE=title
VITE_SUBSCRIPTION=description
VITE_URL=https://jameshsu1125.github.io
VITE_FACEBOOK_ID=your-facebook-id
  • start project
$ npm run dev
  • build static file to /dist
$ npm run build

Status

What's included

  • public folder will copy to /dist
  • src folder is reactJs entry point. default file is named as pages/index.tsx

Bugs and feature requests

  • Node version must be above v18
  • I will not maintain when this project is closed

naming conventions rules

  1. general variable - Camel Case

    ex: setStatecurrentTargetpinkBackgroundinnerText

  2. react components and class name - Pascal Case.

    ex: RegularButtonNavigationBar

  3. global variable or state - Pascal Case.

    ex: ContextLandingState

  4. Immutable variable or environment variable - Screaming Snake Case.

    ex: PAGEVITE_TITLE

  5. type - I = interface, T = type.

    ex: IPropsTResult

  6. enum options - Pascal Case + "Type".

    ex: ActionTypeAlertTypeModalType

  7. class name = Snake Case.

    ex: .button-group.button-label

naming-conventions

Contributing

Please read through our contributing guidelines. Included are directions for opening issues, coding standards, and notes on development.

Moreover, all HTML and CSS should conform to the Code Guide, maintained by Main author.

Creators

maintainer, developer

Thanks

Thank customers and some manufacturers for their support.

Copyright and license

Code and documentation copyright 2011-2022 the authors. Code released under the MIT License.