template-vite-react-ts-tailwind icon indicating copy to clipboard operation
template-vite-react-ts-tailwind copied to clipboard

Starter Vite template for React + Typescript + TailwindCSS + Prettier + ESLint build-in.

My Happy SVG

template-vite-react-ts-tailwind

Introduction

A starter Vite template having:

  • React
  • TypeScript
  • Vite
  • Tailwind CSS
  • Multiple eslint & prettier plugins installed

[!IMPORTANT]

The latest code of this template has updated Vite to version 5.0+, which requires Node.js version 18+ or 20+. Please upgrade if your package manager warns about it. Or you can use this release which is Vite v4.x.

该模板的最新代码中,已经将 Vite 的版本更新到了 5.0+,需要 18+ 或 20+ 版本的 Node.js。当你的包管理器发出警告时,请注意升级你的 Node.js 版本。如果你需要 Vite v4.x,请使用这个版本

[!IMPORTANT]

The latest code of this template has updated TypeScript to version 5.0+. If you need TypeScript v4.x, please use this release.

该模板的最新代码中,已经将 TypeScript 的版本更新到了 5.0+。如果你需要 TypeScript v4.x,请使用这个版本

[!TIP]

This code repository may occasionally update its dependency versions. If the dependency versions in the latest code do not meet your expectations, please go to Tags section to download a previous version of this template. I will display the dependencies used in each Tag, please choose the one you need.

这个代码仓库可能会不定期更新其依赖包的版本。如果最新代码中依赖的版本不符合你的期望,请移步Tags下载之前的模板。每个Tag中使用的依赖都会展示在Tag详情中,请选择你需要的版本。

Install

This project uses node and a package manager (npm, yarn or pnpm). Go check them out if you don't have them locally installed.

Then you need a copy of this repository. You can download a copy as zip but degit is recommended.

After you installed degit, please excute the following commands:

$ cd path-to-save-your-project
$ degit royrao2333/template-vite-react-ts-tailwind your-project-name

After getting a copy of this repository, you can use your package manager to install dependecies:

$ cd path-to-your-project
$ pnpm install

# npm install
# yarn install

Usage

Let's run!

$ pnpm run dev

# npm run dev
# yarn run dev

We've already implemented some recommended configurations in .eslintrc.cjs, .eslintignore, .prettierrc.json5 and .prettierignore. Feel free to edit them if you have your own preferences.

Related Efforts

Contributing

Feel free to dive in! Open an issue or submit PRs.

License

MIT © Roy Rao