Skip to content
This repository was archived by the owner on Mar 30, 2022. It is now read-only.

Commit fb54231

Browse files
added readme
1 parent 75f6ffa commit fb54231

File tree

2 files changed

+76
-1
lines changed

2 files changed

+76
-1
lines changed

package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,11 @@
88
"build": "next build",
99
"start": "next start"
1010
},
11-
"keywords": ["nextjs", "react", "boilerplate"],
11+
"keywords": [
12+
"nextjs",
13+
"react",
14+
"boilerplate"
15+
],
1216
"author": "",
1317
"license": "ISC",
1418
"dependencies": {

readme.md

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# Project Setup with NextJs, Typescript, Eslint, Prettier
2+
This is an example project setup with NextJs, Typescript, Eslint, Prettier, Jest, Enzyme, Styled-JSX, and Github-Pages. NextJs made serverside rendering React framework so easy with much less boilerplate code.
3+
4+
## Setup
5+
6+
0. install nvm in the os
7+
1. `nvm install node`
8+
2. `git init`
9+
3. add `.gitignore`
10+
4. `node -v > .nvmrc`
11+
5. `npm init -y`
12+
13+
### [NextJs](https://github.com/zeit/next.js#how-to-use)
14+
15+
6. `npm i -P next react react-dom`
16+
7. add a script to your package.json like this:
17+
```
18+
{
19+
"scripts": {
20+
"dev": "next",
21+
"build": "next build",
22+
"start": "next start"
23+
}
24+
}
25+
```
26+
27+
### [Typescript](https://github.com/zeit/next-plugins/tree/master/packages/next-typescript#nextjs--typescript)
28+
29+
8. `npm i -D typescript @types/react @types/react-dom @types/node`
30+
9. create `tsconfig.json`
31+
```
32+
{
33+
"compilerOptions": {
34+
"allowJs": true,
35+
"allowSyntheticDefaultImports": true,
36+
"alwaysStrict": true,
37+
"esModuleInterop": true,
38+
"isolatedModules": true,
39+
"jsx": "preserve",
40+
"lib": [
41+
"dom",
42+
"es2017"
43+
],
44+
"module": "esnext",
45+
"moduleResolution": "node",
46+
"noEmit": true,
47+
"typeRoots": [
48+
"./node_modules/@types"
49+
],
50+
"noFallthroughCasesInSwitch": true,
51+
"noUnusedLocals": true,
52+
"noUnusedParameters": true,
53+
"resolveJsonModule": true,
54+
"removeComments": false,
55+
"skipLibCheck": true,
56+
"strict": true,
57+
"target": "esnext",
58+
"forceConsistentCasingInFileNames": true
59+
},
60+
"exclude": [
61+
"node_modules",
62+
"next.config.js"
63+
],
64+
"include": [
65+
"**/*.ts",
66+
"**/*.tsx"
67+
]
68+
}
69+
```
70+
71+

0 commit comments

Comments
 (0)