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 @@ -1137,17 +1137,18 @@ To publish it at [https://myusername.github.io/my-app](https://myusername.github
1137
1137
npm install --save-dev gh-pages
1138
1138
```
1139
1139
1140
- Add the following script in your `package.json`:
1140
+ Add the following scripts in your `package.json`:
1141
1141
1142
1142
```js
1143
1143
// ...
1144
1144
"scripts": {
1145
1145
// ...
1146
- "deploy": "npm run build&&gh-pages -d build"
1146
+ "predeploy": "npm run build",
1147
+ "deploy": "gh-pages -d build"
1147
1148
}
1148
1149
```
1149
1150
1150
- (Note: the lack of whitespace is intentional.)
1151
+ The `predeploy` script will run automatically before `deploy` is run.
1151
1152
1152
1153
#### Step 3: Deploy the site by running `npm run deploy`
1153
1154
You can’t perform that action at this time.
0 commit comments