1- ' use strict' ; 
1+ " use strict" ; 
22
33// Do this as the first thing so that any code reading it knows the right env. 
4- process . env . BABEL_ENV  =  ' development' ; 
5- process . env . NODE_ENV  =  ' development' ; 
4+ process . env . BABEL_ENV  =  " development" ; 
5+ process . env . NODE_ENV  =  " development" ; 
66
77// Makes the script crash on unhandled rejections instead of silently 
88// ignoring them. In the future, promise rejections that are not handled will 
99// terminate the Node.js process with a non-zero exit code. 
10- process . on ( ' unhandledRejection' ,  err  =>  { 
10+ process . on ( " unhandledRejection" ,  err  =>  { 
1111  throw  err ; 
1212} ) ; 
1313
1414// Ensure environment variables are read. 
15- require ( ' ../config/env' ) ; 
15+ require ( " ../config/env" ) ; 
1616
17- const  fs  =  require ( 'fs' ) ; 
18- const  chalk  =  require ( ' chalk' ) ; 
19- const  webpack  =  require ( ' webpack' ) ; 
20- const  WebpackDevServer  =  require ( ' webpack-dev-server' ) ; 
21- const  clearConsole  =  require ( ' react-dev-utils/clearConsole' ) ; 
22- const  checkRequiredFiles  =  require ( ' react-dev-utils/checkRequiredFiles' ) ; 
17+ const  fs  =  require ( "fs" ) ; 
18+ const  chalk  =  require ( " chalk" ) ; 
19+ const  webpack  =  require ( " webpack" ) ; 
20+ const  WebpackDevServer  =  require ( " webpack-dev-server" ) ; 
21+ const  clearConsole  =  require ( " react-dev-utils/clearConsole" ) ; 
22+ const  checkRequiredFiles  =  require ( " react-dev-utils/checkRequiredFiles" ) ; 
2323const  { 
2424  choosePort, 
2525  createCompiler, 
2626  prepareProxy, 
27-   prepareUrls, 
28- }  =  require ( ' react-dev-utils/WebpackDevServerUtils' ) ; 
29- const  openBrowser  =  require ( ' react-dev-utils/openBrowser' ) ; 
30- const  paths  =  require ( ' ../config/paths' ) ; 
31- const  config  =  require ( ' ../config/webpack.config.dev' ) ; 
32- const  createDevServerConfig  =  require ( ' ../config/webpackDevServer.config' ) ; 
27+   prepareUrls
28+ }  =  require ( " react-dev-utils/WebpackDevServerUtils" ) ; 
29+ const  openBrowser  =  require ( " react-dev-utils/openBrowser" ) ; 
30+ const  paths  =  require ( " ../config/paths" ) ; 
31+ const  config  =  require ( " ../config/webpack.config.dev" ) ; 
32+ const  createDevServerConfig  =  require ( " ../config/webpackDevServer.config" ) ; 
3333
3434const  useYarn  =  fs . existsSync ( paths . yarnLockFile ) ; 
3535const  isInteractive  =  process . stdout . isTTY ; 
@@ -41,7 +41,7 @@ if (!checkRequiredFiles([paths.appHtml, paths.appIndexJs])) {
4141
4242// Tools like Cloud9 rely on this. 
4343const  DEFAULT_PORT  =  parseInt ( process . env . PORT ,  10 )  ||  3000 ; 
44- const  HOST  =  process . env . HOST  ||  ' 0.0.0.0' ; 
44+ const  HOST  =  process . env . HOST  ||  " 0.0.0.0" ; 
4545
4646if  ( process . env . HOST )  { 
4747  console . log ( 
@@ -54,7 +54,7 @@ if (process.env.HOST) {
5454  console . log ( 
5555    `If this was unintentional, check that you haven't mistakenly set it in your shell.` 
5656  ) ; 
57-   console . log ( `Learn more here: ${ chalk . yellow ( ' http://bit.ly/2mwWSwH' ) }  ` ) ; 
57+   console . log ( `Learn more here: ${ chalk . yellow ( " http://bit.ly/2mwWSwH" ) }  ` ) ; 
5858  console . log ( ) ; 
5959} 
6060
@@ -66,7 +66,7 @@ choosePort(HOST, DEFAULT_PORT)
6666      // We have not found a port. 
6767      return ; 
6868    } 
69-     const  protocol  =  process . env . HTTPS  ===  ' true'   ? ' https'   : ' http' ; 
69+     const  protocol  =  process . env . HTTPS  ===  " true"   ? " https"   : " http" ; 
7070    const  appName  =  require ( paths . appPackageJson ) . name ; 
7171    const  urls  =  prepareUrls ( protocol ,  HOST ,  port ) ; 
7272    // Create a webpack compiler that is configured with custom messages. 
@@ -88,11 +88,11 @@ choosePort(HOST, DEFAULT_PORT)
8888      if  ( isInteractive )  { 
8989        clearConsole ( ) ; 
9090      } 
91-       console . log ( chalk . cyan ( ' Starting the development server...\n' ) ) ; 
91+       console . log ( chalk . cyan ( " Starting the development server...\n" ) ) ; 
9292      openBrowser ( urls . localUrlForBrowser ) ; 
9393    } ) ; 
9494
95-     [ ' SIGINT' ,   ' SIGTERM' ] . forEach ( function ( sig )  { 
95+     [ " SIGINT" ,   " SIGTERM" ] . forEach ( function ( sig )  { 
9696      process . on ( sig ,  function ( )  { 
9797        devServer . close ( ) ; 
9898        process . exit ( ) ; 
0 commit comments