Skip to content

Commit 68cc157

Browse files
committed
Initial commit
0 parents  commit 68cc157

24 files changed

+18693
-0
lines changed

.babelrc

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"presets": [
3+
"@babel/preset-env",
4+
"@babel/preset-react",
5+
"@babel/preset-typescript"
6+
]
7+
}

.editorconfig

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
root = true
2+
3+
[*]
4+
indent_style = spaces
5+
indent_size = 2
6+
end_of_line = lf
7+
charset = utf-8
8+
trim_trailing_whitespace = true
9+
insert_final_newline = true

.eslintrc

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
{
2+
"env": {
3+
"browser": true,
4+
"es2020": true,
5+
"jest": true,
6+
"node": true
7+
},
8+
"settings": {
9+
"react": {
10+
"version": "detect"
11+
}
12+
},
13+
"extends": [
14+
"eslint:recommended",
15+
"plugin:react/recommended",
16+
"plugin:@typescript-eslint/eslint-recommended",
17+
"plugin:@typescript-eslint/recommended",
18+
"plugin:prettier/recommended",
19+
"plugin:tailwindcss/recommended"
20+
],
21+
"parser": "@typescript-eslint/parser",
22+
"parserOptions": {
23+
"ecmaFeatures": {
24+
"jsx": true
25+
},
26+
"ecmaVersion": 11,
27+
"sourceType": "module"
28+
},
29+
"plugins": ["react", "react-hooks", "@typescript-eslint", "tailwindcss"],
30+
"rules": {
31+
"react-hooks/rules-of-hooks": "error",
32+
"react-hooks/exhaustive-deps": "warn",
33+
"react/prop-types": "off",
34+
"react/react-in-jsx-scope": "off",
35+
"@typescript-eslint/explicit-module-boundary-types": "off",
36+
"@typescript-eslint/no-non-null-assertion": "off",
37+
"tailwindcss/classnames-order": "warn",
38+
"tailwindcss/no-custom-classname": "warn",
39+
"tailwindcss/no-contradicting-classname": "error"
40+
}
41+
}

.gitignore

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
dist
2+
dist-ssr
3+
*.local
4+
5+
# dependencies
6+
/node_modules
7+
/.pnp
8+
.pnp.js
9+
10+
# testing
11+
/coverage
12+
13+
# next.js
14+
/.next/
15+
/out/
16+
17+
# production
18+
/build
19+
20+
# misc
21+
.DS_Store
22+
*.pem
23+
24+
# debug
25+
npm-debug.log*
26+
yarn-debug.log*
27+
yarn-error.log*
28+
29+
# local env files
30+
.env.local
31+
.env.development.local
32+
.env.test.local
33+
.env.production.local
34+
35+
# vercel
36+
.vercel

.jest/setup.ts

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
import '@testing-library/jest-dom'

.prettierrc

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"trailingComma": "none",
3+
"semi": false,
4+
"singleQuote": true
5+
}

.vscode/settings.json

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"editor.codeActionsOnSave": {
3+
"source.fixAll.eslint": true
4+
}
5+
}

README.md

+66
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# React Tailwindcss Boilerplate build with Vite
2+
3+
This is a [ReactJS](https://reactjs.org) + [Vite](https://vitejs.dev) boilerplate to be used with [Tailwindcss](https://tailwindcss.com).
4+
5+
## What is inside?
6+
7+
This project uses many tools like:
8+
9+
- [ReactJS](https://reactjs.org)
10+
- [Vite](https://vitejs.dev)
11+
- [TypeScript](https://www.typescriptlang.org)
12+
- [Jest](https://jestjs.io)
13+
- [Testing Library](https://testing-library.com)
14+
- [Tailwindcss](https://tailwindcss.com)
15+
- [Eslint](https://eslint.org)
16+
- [Prettier](https://prettier.io)
17+
18+
## Getting Started
19+
20+
### Install
21+
22+
Create the project.
23+
24+
```bash
25+
npx degit joaopaulomoraes/reactjs-vite-tailwindcss-boilerplate my-app
26+
```
27+
28+
Access the project directory.
29+
30+
```bash
31+
cd my-app
32+
```
33+
34+
Install dependencies.
35+
36+
```bash
37+
npm install
38+
```
39+
40+
Serve with hot reload at http://localhost:3000.
41+
42+
```bash
43+
npm run dev
44+
```
45+
46+
### Lint
47+
48+
```bash
49+
npm run lint
50+
```
51+
52+
### Build
53+
54+
```bash
55+
npm run build
56+
```
57+
58+
### Test
59+
60+
```bash
61+
npm run test
62+
```
63+
64+
## License
65+
66+
This project is licensed under the MIT License.

index.html

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<link rel="icon" type="image/svg+xml" href="/src/public/favicon.svg" />
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
7+
<title>React + Vite Tailwindcss boilerplate</title>
8+
</head>
9+
<body>
10+
<div id="root"></div>
11+
<script type="module" src="/src/index.tsx"></script>
12+
</body>
13+
</html>

jest.config.js

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
module.exports = {
2+
testEnvironment: 'jsdom',
3+
testPathIgnorePatterns: ['/node_modules/'],
4+
collectCoverage: true,
5+
collectCoverageFrom: ['src/**/*.ts(x)'],
6+
setupFilesAfterEnv: ['<rootDir>/.jest/setup.ts'],
7+
modulePaths: ['<rootDir>/src/', '<rootDir>/.jest']
8+
}

0 commit comments

Comments
 (0)