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

Commit e6468c1

Browse files
committed
file clean up format
1 parent 9e3958d commit e6468c1

File tree

5 files changed

+37
-50
lines changed

5 files changed

+37
-50
lines changed

README.md

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,46 @@
11
# `typescript-hapi-react-hot-loader-example`
2+
23
TypeScript example universal/isomorphic application demonstrating react-hot-loader-4 with webpack-4, react and friends, async code splitting, and hapi.
34

4-
> [Check out the JavaScript version here](https://github.com/codeBelt/hapi-react-hot-loader-example#no-longer-maintained-i-will-continue-to-maintain-the-typescript-version)
5+
> [Check out the JavaScript version here](https://github.com/codeBelt/hapi-react-hot-loader-example#no-longer-maintained-i-will-continue-to-maintain-the-typescript-version)
56
67
> Found this usefull? give it a :star:
78
89
**Windows users see the last section of this README**
910

1011
## get started
11-
1. $ `yarn`
12-
2. $ `yarn dev`
12+
13+
1. \$ `yarn`
14+
2. \$ `yarn dev`
1315
3. http://localhost:3000
1416

1517
## dev tasks
16-
- $ `yarn lint` (eslint)
17-
- $ `yarn dev` (local development w/ server)
18+
19+
- \$ `yarn lint` (eslint)
20+
- \$ `yarn dev` (local development w/ server)
1821

1922
> Type `rs` with a carriage return to restart nodemon if you make changes to the `server.js` file or any files within the `server` folder. It's not efficient to automatically restart nodemon on file changes.
2023
2124
###### Note: Saga's do not hot load. You will have to reload the browser. [Read more about potential issues](https://github.com/redux-saga/redux-saga/issues/22#issuecomment-218737951) and/or [implement yourself](https://gist.github.com/markerikson/dc6cee36b5b6f8d718f2e24a249e0491).
2225

23-
2426
## production tasks
25-
- $ `yarn prod` (production build w/ server)
26-
- $ `yarn prod:build` (production build)
27+
28+
- \$ `yarn prod` (production build w/ server)
29+
- \$ `yarn prod:build` (production build)
2730

2831
## staging tasks
29-
- $ `yarn local` (local build w/ server)
30-
- $ `yarn local:build` (local build)
32+
33+
- \$ `yarn local` (local build w/ server)
34+
- \$ `yarn local:build` (local build)
3135

3236
---
3337

3438
##### Other features/examples I am working:
35-
* Jest / Enzyme
39+
40+
- Jest / Enzyme
3641

3742
## Window Users
38-
Use $ `yarn devWindows` during development. Note `rs` to restart nodemon will not work on windows.
43+
44+
Use \$ `yarn devWindows` during development. Note `rs` to restart nodemon will not work on windows.
3945

4046
If you want `rs` to restart nodemon you will need to run `yarn watchServer` and `yarn devServer` in two separate terminals.

postcss.config.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module.exports = {
22
plugins: {
3-
'autoprefixer': {}
4-
}
3+
autoprefixer: {},
4+
},
55
};

tsconfig.json

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,7 @@
66
"baseUrl": ".",
77
"forceConsistentCasingInFileNames": true,
88
"jsx": "react",
9-
"lib": [
10-
"dom",
11-
"es2016",
12-
"es2017"
13-
],
9+
"lib": ["dom", "es2016", "es2017"],
1410
"module": "esnext",
1511
"moduleResolution": "node",
1612
"noImplicitAny": true,
@@ -24,11 +20,6 @@
2420
"suppressImplicitAnyIndexErrors": true,
2521
"target": "es5"
2622
},
27-
"include": [
28-
"src/**/*"
29-
],
30-
"exclude": [
31-
"node_modules",
32-
"build"
33-
]
23+
"include": ["src/**/*"],
24+
"exclude": ["node_modules", "build"]
3425
}

tsconfig.server.json

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,7 @@
66
"experimentalDecorators": true,
77
"forceConsistentCasingInFileNames": true,
88
"jsx": "react",
9-
"lib": [
10-
"dom",
11-
"es2016",
12-
"es2017"
13-
],
9+
"lib": ["dom", "es2016", "es2017"],
1410
"module": "commonjs",
1511
"moduleResolution": "node",
1612
"noImplicitAny": true,
@@ -25,10 +21,6 @@
2521
"suppressImplicitAnyIndexErrors": true,
2622
"target": "es2016"
2723
},
28-
"include": [
29-
"src/**/*"
30-
],
31-
"exclude": [
32-
"node_modules"
33-
]
24+
"include": ["src/**/*"],
25+
"exclude": ["node_modules"]
3426
}

webpack.config.js

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ const webpackConfig = {
5757
{
5858
test: /\.(ts|js)x?$/,
5959
loader: 'babel-loader',
60-
exclude: /node_modules/
60+
exclude: /node_modules/,
6161
},
6262
{
6363
test: /\.s?css$/,
@@ -68,20 +68,20 @@ const webpackConfig = {
6868
loader: 'css-loader',
6969
options: {
7070
minimize: isProduction,
71-
sourceMap: !isProduction
71+
sourceMap: !isProduction,
7272
},
7373
},
7474
{
7575
loader: 'postcss-loader',
7676
options: {
77-
sourceMap: !isProduction
77+
sourceMap: !isProduction,
7878
},
7979
},
8080
{
8181
loader: 'sass-loader',
8282
options: {
83-
sourceMap: !isProduction
84-
}
83+
sourceMap: !isProduction,
84+
},
8585
},
8686
],
8787
},
@@ -112,10 +112,8 @@ const webpackConfig = {
112112

113113
new webpack.LoaderOptionsPlugin({
114114
options: {
115-
postcss: [
116-
autoprefixer()
117-
]
118-
}
115+
postcss: [autoprefixer()],
116+
},
119117
}),
120118

121119
isDevelopment
@@ -138,8 +136,8 @@ const webpackConfig = {
138136
context: 'src/assets',
139137
from: '**/*',
140138
to: 'assets',
141-
ignore: ['styles/**/*']
142-
}
139+
ignore: ['styles/**/*'],
140+
},
143141
]),
144142

145143
new RobotstxtPlugin({
@@ -165,8 +163,8 @@ const webpackConfig = {
165163
chunks: 'all',
166164
enforce: true,
167165
},
168-
}
169-
}
166+
},
167+
},
170168
},
171169

172170
devtool: isProduction

0 commit comments

Comments
 (0)