https://github.com/monaye/vite-vitest-react-ts-starter
Simple React starter template with Vite/Vitest/Typescript setup.
https://github.com/monaye/vite-vitest-react-ts-starter
Last synced: 2 months ago
JSON representation
Simple React starter template with Vite/Vitest/Typescript setup.
- Host: GitHub
- URL: https://github.com/monaye/vite-vitest-react-ts-starter
- Owner: monaye
- Created: 2024-01-24T18:48:00.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-01-28T03:32:47.000Z (5 months ago)
- Last Synced: 2025-04-06T09:41:07.659Z (2 months ago)
- Language: HTML
- Size: 254 KB
- Stars: 9
- Watchers: 1
- Forks: 1
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# A vite-based react starter
## Features
1. vite + typescript + swr
2. vitest
3. sass
4. prettier## Usage
### 1. Clone to local
```bash
git clone [email protected]:monaye/vite-vitest-react-ts-starter.git
```### 2. Install dependencies
```bash
npm install
```### 3. Development
```bash
npm run dev
```## Installed Packages
### Prettier
```
npm i -D prettier & eslint-config-prettier
```### Testing Library Package
```
npm i -D vitest jsdom
npm i -D @testing-library/react @testing-library/jest-dom
npm i -D @vitest/ui @vitest/coverage-v8
```### sass support
```
npm i -D sass
```## Added Commands
This starter template added few useful commands. For all avaiable commands, please look at the `package.json`.
### Format project with Prettier
Run prettier on whole project including root path.
By default [prettier ignore](https://prettier.io/docs/en/cli.html#--ignore-path) file patterns describe in `./.gitignore` and `./.prettierignore````
npm run format
```### Run vitest testing
By default [vitest `includes`](https://vitest.dev/config/#include) `['**/*.{test,spec}.?(c|m)[jt]s?(x)']`.
```
npm run test
npm run test:ui
npm run test:coverage
```