Skip to content

A Minimal ⚛️ React Starter Template with Vite, TailwindCSS, and Typescript pre-configured with ESLint and Prettier.

License

Notifications You must be signed in to change notification settings

Khushal-ag/react-template-viteTs

Repository files navigation

views stars forks issues license repo-size

React Starter Template w/ ViteTs

A Minimal React Starter Template with Vite, TailwindCSS, and TypeScript pre-configured with ESLint and Prettier


Template Preview
mockup

Features

  • Vite - Lightning fast frontend tooling
  • ⚛️ React 18 - A JavaScript library for building user interfaces
  • 🎨 TailwindCSS - A utility-first CSS framework for rapidly building custom designs
  • 📦 TypeScript - A typed superset of JavaScript that compiles to plain JavaScript
  • 📦 react-router-dom - Declarative routing for React
  • 📦 lucide-react - Beautiful & consistent icons
  • 📝 ESLint - The pluggable linting utility for JavaScript and JSX
  • Prettier - An opinionated code formatter
  • 📦 pnpm - Fast, disk space efficient package manager

Getting Started

Scaffold the project:

pnpx degit Khushal-ag/react-template-viteTs <project-name>

cd <project-name>

Install dependencies:

pnpm i

Initialize a new git repository (Optional):

git init
git add .
git commit -m "init"

Available Scripts

In the project directory, you can run:

Script Description
dev Runs the app in the development mode.
build Builds the app for production to the dist folder.
serve Serves the production build from the dist folder.
preview Bundles and serves the production build from the dist folder.
type-check Runs TypeScript type-checking.
lint Runs ESLint with Prettier.
fix Runs ESLint with Prettier and fixes the errors.
fmt Checks if the code is formatted with Prettier, if not then formats the code.
fmt:check Checks if the code is formatted with Prettier.
fmt:write Formats the code with Prettier.

After Installation Checklist

  • Update package.json with your project details.
  • Update README.md with your project details.
  • Update LICENSE with your name and year.
  • Update index.html to your liking.
  • Clear app.tsx and write your own.

Switching Package Manager

This template uses pnpm as the default package manager. If you want to use npm or yarn, you need to remove the pnpm-lock.yaml file and run npm i or yarn to generate the lock file for the respective package manager.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Contributors

Note: It may take up to 24h for the contrib.rocks plugin to update because it's refreshed once a day.