This template has been configured with all of the tools required to create a React Application using TypeScript and TailwindCSS with Vite.
- React
- TypeScript
- TailwindCSS for utility CSS classes
- ESLint configured with some initial rules
- Prettier to enforce consistent code style
- Vitest for unit testing and code coverage
- Vite to build the project for development or production
- Husky 🐶 runs the full list of specs before committing your changes to ensure that you have a green build
git clone https://github.com/nrabhiram/vite-react-ts-tailwind-template.git
- Run
npm install
to install all of the project's dependencies - Build the project for production:
npm run build
- Run the local development server:
npm run dev
-
Create a CSS Module file by following the naming convention -
<Component>.module.css
-
Use the
@apply
directive in your CSS class definitions to use Tailwind's utility classes into your own custom CSS.app-heading { @apply text-5xl font-semibold mb-4; }
-
Import the CSS Module file into the React component file
prettier-format
- run the autoformatterlint
- run the lintertest
- run the specstest-filter <spec-name>
- run a specific speccoverage
- get a coverage report of the specsbuild
- build the project files for distributiondev
- run the local development server
Feel free to open an issue or create a PR if you'd like to contribute 🙌
The project is available as open source under the terms of the MIT License.