File tree 2 files changed +6
-4
lines changed
2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -181,7 +181,8 @@ function build(previousSizeMap) {
181
181
console . log ( ' ' + chalk . dim ( '// ...' ) ) ;
182
182
console . log ( ' ' + chalk . yellow ( '"scripts"' ) + ': {' ) ;
183
183
console . log ( ' ' + chalk . dim ( '// ...' ) ) ;
184
- console . log ( ' ' + chalk . yellow ( '"deploy"' ) + ': ' + chalk . yellow ( '"npm run build&&gh-pages -d build"' ) ) ;
184
+ console . log ( ' ' + chalk . yellow ( '"predeploy"' ) + ': ' + chalk . yellow ( '"npm run build",' ) ) ;
185
+ console . log ( ' ' + chalk . yellow ( '"deploy"' ) + ': ' + chalk . yellow ( '"gh-pages -d build"' ) ) ;
185
186
console . log ( ' }' ) ;
186
187
console . log ( ) ;
187
188
console . log ( 'Then run:' ) ;
Original file line number Diff line number Diff line change @@ -1132,17 +1132,18 @@ To publish it at [https://myusername.github.io/my-app](https://myusername.github
1132
1132
npm install --save-dev gh-pages
1133
1133
```
1134
1134
1135
- Add the following script in your `package.json`:
1135
+ Add the following scripts in your `package.json`:
1136
1136
1137
1137
```js
1138
1138
// ...
1139
1139
"scripts": {
1140
1140
// ...
1141
- "deploy": "npm run build&&gh-pages -d build"
1141
+ "predeploy": "npm run build",
1142
+ "deploy": "gh-pages -d build"
1142
1143
}
1143
1144
```
1144
1145
1145
- (Note: the lack of whitespace is intentional.)
1146
+ The `predeploy` script will run automatically before `deploy` is run.
1146
1147
1147
1148
#### Step 3: Deploy the site by running `npm run deploy`
1148
1149
You can’t perform that action at this time.
0 commit comments