From 77a181978e992ab983c863f21bc62149d90981dc Mon Sep 17 00:00:00 2001 From: Sidharth Vinod Date: Mon, 14 Aug 2023 00:40:48 +0530 Subject: [PATCH] chore: Replace Date.now with console.time Co-authored-by: Alois Klink --- .esbuild/server.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.esbuild/server.ts b/.esbuild/server.ts index 7e39b0a6e..32867ded4 100644 --- a/.esbuild/server.ts +++ b/.esbuild/server.ts @@ -20,9 +20,9 @@ const zenumlCtx = await context( const contexts = [mermaidCtx, mermaidIIFECtx, externalCtx, zenumlCtx]; const rebuildAll = async () => { - const time = Date.now(); + console.time('Rebuild time'); await Promise.all(contexts.map((ctx) => ctx.rebuild())); - console.log('Rebuilt in' + (Date.now() - time) + 'ms'); + console.timeEnd('Rebuild time'); }; let clients: { id: number; response: Response }[] = []; @@ -64,7 +64,7 @@ function sendEventsToAll() { } async function createServer() { - await rebuildAll(); + handleFileChange(); const app = express(); chokidar .watch('**/src/**/*.{js,ts,yaml,json}', {