|
1 | 1 | //@flow |
2 | 2 |
|
3 | | -importdebouncefrom"lodash/debounce"; |
4 | 3 | importslashfrom"slash"; |
5 | 4 | importpathfrom"path"; |
6 | 5 | importfsfrom"fs"; |
@@ -135,27 +134,23 @@ export default async function ({ |
135 | 134 | letcompiledFiles=0; |
136 | 135 | letstartTime=null; |
137 | 136 |
|
138 | | -constlogSuccess=debounce( |
139 | | -function(){ |
140 | | -if(startTime===null){ |
141 | | -// This should never happen, but just in case it's better |
142 | | -// to ignore the log message rather than making@babel/cli crash. |
143 | | -return; |
144 | | -} |
| 137 | +constlogSuccess=util.debounce(function(){ |
| 138 | +if(startTime===null){ |
| 139 | +// This should never happen, but just in case it's better |
| 140 | +// to ignore the log message rather than making@babel/cli crash. |
| 141 | +return; |
| 142 | +} |
145 | 143 |
|
146 | | -constdiff=process.hrtime(startTime); |
147 | | - |
148 | | -console.log( |
149 | | -`Successfully compiled${compiledFiles}${ |
150 | | -compiledFiles!==1 ?"files" :"file" |
151 | | -} with Babel (${diff[0]*1e3+Math.round(diff[1]/1e6)}ms).`, |
152 | | -); |
153 | | -compiledFiles=0; |
154 | | -startTime=null; |
155 | | -}, |
156 | | -100, |
157 | | -{trailing:true}, |
158 | | -); |
| 144 | +constdiff=process.hrtime(startTime); |
| 145 | + |
| 146 | +console.log( |
| 147 | +`Successfully compiled${compiledFiles}${ |
| 148 | +compiledFiles!==1 ?"files" :"file" |
| 149 | +} with Babel (${diff[0]*1e3+Math.round(diff[1]/1e6)}ms).`, |
| 150 | +); |
| 151 | +compiledFiles=0; |
| 152 | +startTime=null; |
| 153 | +},100); |
159 | 154 |
|
160 | 155 | if(!cliOptions.skipInitialBuild){ |
161 | 156 | if(cliOptions.deleteDirOnStart){ |
|