@@ -118,7 +118,11 @@ function build(previousSizeMap) {
118118    var  publicPath  =  config . output . publicPath ; 
119119    if  ( homepagePath  &&  homepagePath . indexOf ( '.github.io/' )  !==  - 1 )  { 
120120      // "homepage": "http://user.github.io/project" 
121-       console . log ( 'You can now deploy them to '  +  chalk . green ( homepagePath )  +  ':' ) ; 
121+       console . log ( 'The project was built assuming it is hosted at '  +  chalk . green ( publicPath )  +  '.' ) ; 
122+       console . log ( 'You can control this with the '  +  chalk . green ( 'homepage' )  +  ' field in your '   +  chalk . cyan ( 'package.json' )  +  '.' ) ; 
123+       console . log ( ) ; 
124+       console . log ( 'The '  +  chalk . cyan ( 'build' )  +  ' folder is ready to be deployed.' ) ; 
125+       console . log ( 'To publish it at '  +  chalk . green ( homepagePath )  +  ', run:' ) ; 
122126      console . log ( ) ; 
123127      console . log ( '  '  +  chalk . blue ( 'git' )  +  chalk . cyan ( ' commit -am ' )  +  chalk . yellow ( '"Save local changes"' ) ) ; 
124128      console . log ( '  '  +  chalk . blue ( 'git' )  +  chalk . cyan ( ' checkout -B gh-pages' ) ) ; 
@@ -128,32 +132,35 @@ function build(previousSizeMap) {
128132      console . log ( '  '  +  chalk . blue ( 'git' )  +  chalk . cyan ( ' push -f origin gh-pages' ) ) ; 
129133      console . log ( '  '  +  chalk . blue ( 'git' )  +  chalk . cyan ( ' checkout -' ) ) ; 
130134      console . log ( ) ; 
131-       console . log ( 'The project was built assuming it is hosted at '  +  chalk . green ( publicPath )  +  '.' ) ; 
132-       console . log ( 'You can control this with the '  +  chalk . green ( 'homepage' )  +  ' field in your '   +  chalk . cyan ( 'package.json' )  +  '.' ) ; 
133135    }  else  if  ( publicPath  !==  '/' )  { 
134136      // "homepage": "http://mywebsite.com/project" 
135137      console . log ( 'The project was built assuming it is hosted at '  +  chalk . green ( publicPath )  +  '.' ) ; 
136138      console . log ( 'You can control this with the '  +  chalk . green ( 'homepage' )  +  ' field in your '   +  chalk . cyan ( 'package.json' )  +  '.' ) ; 
137-     }  else  { 
138-       // no homepage or "homepage": "http://mywebsite.com" 
139-       console . log ( 'You can now deploy them or serve them with a static server:' ) ; 
140139      console . log ( ) ; 
141-       console . log ( '  '  +  chalk . blue ( 'npm' )  +   chalk . cyan ( ' install -g pushstate-server' ) ) ; 
142-       console . log ( '  '  +  chalk . blue ( 'pushstate-server' )  +  chalk . cyan ( ' build' ) ) ; 
143-       console . log ( '  '  +  chalk . blue ( openCommand )  +  chalk . cyan ( ' http://localhost:9000' ) ) ; 
140+       console . log ( 'The '  +  chalk . cyan ( 'build' )  +  ' folder is ready to be deployed.' ) ; 
144141      console . log ( ) ; 
142+     }  else  { 
143+       // no homepage or "homepage": "http://mywebsite.com" 
145144      console . log ( 'The project was built assuming it is hosted at the server root.' ) ; 
146145      if  ( homepagePath )  { 
147146        // "homepage": "http://mywebsite.com" 
148147        console . log ( 'You can control this with the '  +  chalk . green ( 'homepage' )  +  ' field in your '   +  chalk . cyan ( 'package.json' )  +  '.' ) ; 
148+         console . log ( ) ; 
149149      }  else  { 
150150        // no homepage 
151151        console . log ( 'To override this, specify the '  +  chalk . green ( 'homepage' )  +  ' in your '   +  chalk . cyan ( 'package.json' )  +  '.' ) ; 
152152        console . log ( 'For example, add this to build it for GitHub Pages:' ) 
153153        console . log ( ) ; 
154154        console . log ( '  '  +  chalk . green ( '"homepage"' )  +  chalk . cyan ( ': ' )  +  chalk . green ( '"http://myname.github.io/myapp"' )  +  chalk . cyan ( ',' ) ) ; 
155+         console . log ( ) ; 
155156      } 
157+       console . log ( 'The '  +  chalk . cyan ( 'build' )  +  ' folder is ready to be deployed.' ) ; 
158+       console . log ( 'You may also serve it locally with a static server:' ) 
159+       console . log ( ) ; 
160+       console . log ( '  '  +  chalk . blue ( 'npm' )  +   chalk . cyan ( ' install -g pushstate-server' ) ) ; 
161+       console . log ( '  '  +  chalk . blue ( 'pushstate-server' )  +  chalk . cyan ( ' build' ) ) ; 
162+       console . log ( '  '  +  chalk . blue ( openCommand )  +  chalk . cyan ( ' http://localhost:9000' ) ) ; 
163+       console . log ( ) ; 
156164    } 
157-     console . log ( ) ; 
158165  } ) ; 
159166} 
0 commit comments