File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -181,7 +181,8 @@ function build(previousSizeMap) {
181181 console . log ( ' ' + chalk . dim ( '// ...' ) ) ;
182182 console . log ( ' ' + chalk . yellow ( '"scripts"' ) + ': {' ) ;
183183 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"' ) ) ;
185186 console . log ( ' }' ) ;
186187 console . log ( ) ;
187188 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
11371137npm install --save-dev gh-pages
11381138```
11391139
1140- Add the following script in your `package.json`:
1140+ Add the following scripts in your `package.json`:
11411141
11421142```js
11431143 // ...
11441144 "scripts": {
11451145 // ...
1146- "deploy": "npm run build&&gh-pages -d build"
1146+ "predeploy": "npm run build",
1147+ "deploy": "gh-pages -d build"
11471148 }
11481149```
11491150
1150- (Note: the lack of whitespace is intentional.)
1151+ The `predeploy` script will run automatically before `deploy` is run.
11511152
11521153#### Step 3: Deploy the site by running `npm run deploy`
11531154
You can’t perform that action at this time.
0 commit comments