Skip to content

Commit 44cad96

Browse files
committed
chore(setup): 🌅 setup boilerplate Co-authored-by: George Gillams [email protected]
1 parent 207e76f commit 44cad96

19 files changed

+5317
-1
lines changed

.eslintrc.cjs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
module.exports = {
2+
root: true,
3+
env: { browser: true, es2020: true },
4+
extends: [
5+
'eslint:recommended',
6+
'plugin:@typescript-eslint/recommended',
7+
'plugin:react-hooks/recommended',
8+
],
9+
ignorePatterns: ['dist', '.eslintrc.cjs'],
10+
parser: '@typescript-eslint/parser',
11+
plugins: [],
12+
}

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,3 +128,7 @@ dist
128128
.yarn/build-state.yml
129129
.yarn/install-state.gz
130130
.pnp.*
131+
132+
# editors
133+
.vscode
134+
.idea

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
20

.prettierrc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"semi": false,
3+
"trailingComma": "all",
4+
"singleQuote": true,
5+
"printWidth": 180,
6+
"arrowParens": "always"
7+
}

CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @Typeform/developers

README.md

Lines changed: 54 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,55 @@
11
# react-typescript-boilerplate
2-
A simple React + TypeScript boilerplate powered by Vite and Vitest
2+
3+
Howdy 👋 This is a simple React + Typescript boilerplate it contains:
4+
5+
- A simple React component.
6+
- A simple unit test with [@testing-library/react](https://testing-library.com/docs/react-testing-library/intro/).
7+
8+
## Prerequisites
9+
10+
Before running this repository, make sure you have the following installed on your machine:
11+
12+
1. Node.js (see `.nvmrc`)
13+
2. npm (Node Package Manager)
14+
15+
## Installation
16+
17+
1. Clone the repository to your local machine.
18+
2. Open a terminal and navigate to the project directory.
19+
3. Run the command `npm install` to install the project dependencies.
20+
4. Verify that the installation was successful by running the commands `npm run dev` and `npm run test`.
21+
22+
## Development Server
23+
24+
To start the development server, run the following command:
25+
26+
```
27+
npm run dev
28+
```
29+
30+
This will start the server and open the application in your default browser. You should see no errors or warnings, here's an example of what you should see in the terminal:
31+
32+
<img title="npm run dev" alt="npm run dev" width="320" src="./npm-run-dev.png">
33+
34+
And here's what you should see in your browser:
35+
36+
<img title="Example React App" alt="Example React App" width="520" src="./npm-run-dev-browser.png">
37+
38+
## Running Tests
39+
40+
To run the tests, use the following command:
41+
42+
```
43+
44+
npm run test
45+
46+
```
47+
48+
This will execute the test suite and display the results in the terminal.
49+
50+
<img title="npm run test" alt="npm run test" width="320" src="./npm-run-test.png">
51+
52+
## License
53+
54+
This project is licensed under the [MIT License](LICENSE).
55+

background.png

433 KB
Loading

favicon.ico

14.7 KB
Binary file not shown.

index.html

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<!doctype html>
2+
<html lang="en">
3+
4+
<head>
5+
<meta charset="UTF-8" />
6+
<link rel="icon" type="image/svg+xml" href="/favicon.ico" />
7+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
8+
<title>Typeform React + TS Boilerplate</title>
9+
</head>
10+
11+
<body>
12+
<div id="root"></div>
13+
<script type="module" src="/src/main.tsx"></script>
14+
</body>
15+
16+
</html>

npm-run-dev-browser.png

186 KB
Loading

0 commit comments

Comments
 (0)