@@ -32,7 +32,7 @@ function releaseBuild() {
3232 ownerProcess . kill ( "SIGHUP" ) ;
3333 try {
3434 fs . rmSync ( lockFileName ) ;
35- } catch { }
35+ } catch { }
3636 ownerProcess = null ;
3737 }
3838}
@@ -147,7 +147,7 @@ function logFinishCompiling(code) {
147147
148148function logStartCompiling ( ) {
149149 updateStartTime ( ) ;
150- let log = ` >>>> Start compiling` ;
150+ let log = " >>>> Start compiling" ;
151151 if ( shouldColorize ) {
152152 log = `\x1b[36m${ log } \x1b[0m` ;
153153 }
@@ -210,7 +210,7 @@ function watch(args) {
210210 let watchers = [ ] ;
211211
212212 const verbose = args . includes ( "-verbose" ) ;
213- const dlog = verbose ? console . log : ( ) => { } ;
213+ const dlog = verbose ? console . log : ( ) => { } ;
214214
215215 const wsParamIndex = args . indexOf ( "-ws" ) ;
216216 if ( wsParamIndex > - 1 ) {
@@ -253,18 +253,18 @@ function watch(args) {
253253 function setUpWebSocket ( ) {
254254 const _id = setInterval ( notifyClients , 3000 ) ;
255255 createServer ( )
256- . on ( "upgrade" , function ( req , socket , upgradeHead ) {
256+ . on ( "upgrade" , ( req , socket , upgradeHead ) => {
257257 dlog ( "connection opened" ) ;
258- var ws = new WebSocket ( req , socket , upgradeHead ) ;
259- socket . on ( "error" , function ( err ) {
258+ const ws = new WebSocket ( req , socket , upgradeHead ) ;
259+ socket . on ( "error" , err => {
260260 dlog ( `Socket Error ${ err } ` ) ;
261261 } ) ;
262262 wsClients . push ( ws ) ;
263263 } )
264- . on ( "error" , function ( err ) {
264+ . on ( "error" , err => {
265265 // @ts -ignore
266266 if ( err !== undefined && err . code === "EADDRINUSE" ) {
267- var error = shouldColorize ? ` \x1b[1;31mERROR:\x1b[0m` : ` ERROR:` ;
267+ const error = shouldColorize ? " \x1b[1;31mERROR:\x1b[0m" : " ERROR:" ;
268268 console . error ( `${ error } The websocket port number ${ webSocketPort } is in use.
269269Please pick a different one using the \`-ws [host:]port\` flag from bsb.` ) ;
270270 } else {
0 commit comments