You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: scripts/start.js
+16-19Lines changed: 16 additions & 19 deletions
Original file line number
Diff line number
Diff line change
@@ -23,12 +23,11 @@ var PORT = 3000;
23
23
// TODO: hide this behind a flag and eliminate dead code on eject.
24
24
// This shouldn't be exposed to the user.
25
25
varhandleCompile;
26
-
varisSmokeTest=process.argv.some(function(arg){
27
-
returnarg.indexOf('--smoke-test')>-1
28
-
});
29
-
26
+
varisSmokeTest=process.argv.some(arg=>
27
+
arg.indexOf('--smoke-test')>-1
28
+
);
30
29
if(isSmokeTest){
31
-
handleCompile=function(err,stats){
30
+
handleCompile=function(err,stats){
32
31
if(err||stats.hasErrors()||stats.hasWarnings()){
33
32
process.exit(1);
34
33
}else{
@@ -70,21 +69,19 @@ function clearConsole() {
70
69
}
71
70
72
71
varcompiler=webpack(config,handleCompile);
73
-
detect(PORT,function(error,_port){
72
+
detect(PORT,(error,_port)=>{
74
73
75
74
if(PORT!==_port){
76
75
varrl=readline.createInterface({
77
76
input: process.stdin,
78
77
output: process.stdout
79
78
});
80
79
81
-
rl.question('Something is already running at http://localhost:'+PORT+'. Would you like to run the app at another port instead? [Y/n] ',function(answer){
80
+
rl.question('Something is already running at http://localhost:'+PORT+'. Would you like to run the app at another port instead? [Y/n] ',(answer)=>{
0 commit comments