@@ -25,8 +25,7 @@ const printHostingInstructions = require('react-dev-utils/printHostingInstructio
25
25
const FileSizeReporter = require ( 'react-dev-utils/FileSizeReporter' ) ;
26
26
const printBuildError = require ( 'react-dev-utils/printBuildError' ) ;
27
27
28
- const measureFileSizesBeforeBuild =
29
- FileSizeReporter . measureFileSizesBeforeBuild ;
28
+ const measureFileSizesBeforeBuild = FileSizeReporter . measureFileSizesBeforeBuild ;
30
29
const printFileSizesAfterBuild = FileSizeReporter . printFileSizesAfterBuild ;
31
30
const useYarn = fs . existsSync ( paths . yarnLockFile ) ;
32
31
@@ -70,19 +69,12 @@ measureFileSizesBeforeBuild(paths.appBuild)
70
69
WARN_AFTER_BUNDLE_GZIP_SIZE ,
71
70
WARN_AFTER_CHUNK_GZIP_SIZE
72
71
) ;
73
- console . log ( ) ;
74
72
75
73
const appPackage = require ( paths . appPackageJson ) ;
76
74
const publicUrl = paths . publicUrl ;
77
75
const publicPath = config . output . publicPath ;
78
76
const buildFolder = path . relative ( process . cwd ( ) , paths . appBuild ) ;
79
- printHostingInstructions (
80
- appPackage ,
81
- publicUrl ,
82
- publicPath ,
83
- buildFolder ,
84
- useYarn
85
- ) ;
77
+ printHostingInstructions ( appPackage , publicUrl , publicPath , buildFolder , useYarn ) ;
86
78
} ,
87
79
err => {
88
80
console . log ( chalk . red ( 'Failed to compile.\n' ) ) ;
@@ -112,22 +104,20 @@ function build(previousFileSizes) {
112
104
}
113
105
if (
114
106
process . env . CI &&
115
- ( typeof process . env . CI !== 'string' ||
116
- process . env . CI . toLowerCase ( ) !== 'false' ) &&
107
+ ( typeof process . env . CI !== 'string' || process . env . CI . toLowerCase ( ) !== 'false' ) &&
117
108
messages . warnings . length
118
109
) {
119
110
console . log (
120
111
chalk . yellow (
121
- '\nTreating warnings as errors because process.env.CI = true.\n' +
122
- 'Most CI servers set it automatically.\n'
112
+ '\nTreating warnings as errors because process.env.CI = true.\n Most CI servers set it automatically.\n'
123
113
)
124
114
) ;
125
115
return reject ( new Error ( messages . warnings . join ( '\n\n' ) ) ) ;
126
116
}
127
117
return resolve ( {
128
118
stats,
129
119
previousFileSizes,
130
- warnings : messages . warnings ,
120
+ warnings : messages . warnings
131
121
} ) ;
132
122
} ) ;
133
123
} ) ;
@@ -136,6 +126,6 @@ function build(previousFileSizes) {
136
126
function copyPublicFolder ( ) {
137
127
fs . copySync ( paths . appPublic , paths . appBuild , {
138
128
dereference : true ,
139
- filter : file => file !== paths . appHtml ,
129
+ filter : file => file !== paths . appHtml
140
130
} ) ;
141
131
}
0 commit comments