This repository was archived by the owner on Oct 16, 2025. It is now read-only.
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 @@ -1132,17 +1132,18 @@ To publish it at [https://myusername.github.io/my-app](https://myusername.github
11321132npm install --save-dev gh-pages
11331133```
11341134
1135- Add the following script in your `package.json`:
1135+ Add the following scripts in your `package.json`:
11361136
11371137```js
11381138 // ...
11391139 "scripts": {
11401140 // ...
1141- "deploy": "npm run build&&gh-pages -d build"
1141+ "predeploy": "npm run build",
1142+ "deploy": "gh-pages -d build"
11421143 }
11431144```
11441145
1145- (Note: the lack of whitespace is intentional.)
1146+ The `predeploy` script will run automatically before `deploy` is run.
11461147
11471148#### Step 3: Deploy the site by running `npm run deploy`
11481149
You can’t perform that action at this time.
0 commit comments