Skip to content
This repository was archived by the owner on Oct 15, 2021. It is now read-only.

Commit 3af835d

Browse files
authored
chore: Upgrade dependencies and add scripts to documentation
1 parent 0d8362a commit 3af835d

File tree

3 files changed

+54
-5
lines changed

3 files changed

+54
-5
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
# misc
77
.DS_Store
8+
.env
89
.env.local
910
.env
1011
.env.development.local

README.md

Lines changed: 49 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Next.js Example app
1+
# Next.js TypeScript Material UI quality checking project
22

33
Includes TypeScript, Material UI, ESLint, Jest, and React Testing Library
44

@@ -19,3 +19,51 @@ yarn create next-app --example https://github.com/MileTwo/nextjs-typescript-mate
1919
```
2020

2121
Deploy it to the cloud with [Vercel](https://vercel.com/new?utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)).
22+
23+
## Scripts
24+
25+
All scripts can be run by prefixing with `npm run`, for example `npm run build`
26+
27+
### build
28+
29+
Builds the production application in the .next folder.
30+
31+
### dev
32+
33+
Starts the application in development mode with hot-code reloading, error reporting, and more:
34+
35+
The application will start at http://localhost:3000 by default. The default port can be changed with -p, like so:
36+
37+
```bash
38+
npm run dev -p 4000
39+
```
40+
41+
### format
42+
43+
Runs ESLint and Prettier auto-formatting.
44+
45+
### lint
46+
47+
Runs ESLint static code analysis based on your `.eslintrc` configuration
48+
49+
### start
50+
51+
Starts the application in production mode. The application should be compiled with `npm run build` first.
52+
53+
The application will start at http://localhost:3000 by default. The default port can be changed with -p, like so:
54+
55+
```bash
56+
npm run start -p 4000
57+
```
58+
59+
### test
60+
61+
Runs Jest unit tests to validate changes between commits
62+
63+
### type-check
64+
65+
Runs TypeScript compiler to validate there are no type errors between commits
66+
67+
### quality
68+
69+
Runs `type-check`, `lint`, and `test` to make an better developer experience catching preventable quality errors.

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,23 +24,23 @@
2424
"@babel/plugin-transform-typescript": "^7.13.0",
2525
"@babel/preset-env": "^7.13.15",
2626
"@babel/preset-typescript": "^7.13.0",
27-
"@testing-library/dom": "^7.30.4",
27+
"@testing-library/dom": "^7.31.0",
2828
"@testing-library/jest-dom": "^5.12.0",
2929
"@testing-library/react": "^11.2.6",
30-
"@types/node": "^15.0.1",
30+
"@types/node": "^15.0.2",
3131
"@types/react": "^17.0.4",
3232
"@types/react-dom": "^17.0.3",
3333
"@typescript-eslint/eslint-plugin": "^4.22.0",
3434
"@typescript-eslint/parser": "^4.22.0",
3535
"babel-eslint": "^10.1.0",
3636
"babel-jest": "^26.6.3",
37-
"eslint": "^7.25.0",
37+
"eslint": "^7.26.0",
3838
"eslint-config-prettier": "^8.3.0",
3939
"eslint-plugin-prettier": "^3.4.0",
4040
"eslint-plugin-react": "^7.23.2",
4141
"identity-obj-proxy": "^3.0.0",
4242
"jest": "^26.6.3",
43-
"prettier": "^2.2.1",
43+
"prettier": "^2.3.0",
4444
"ts-node": "^9.1.1",
4545
"typescript": "^4.2.4"
4646
}

0 commit comments

Comments
 (0)