mirror of
				https://github.com/mermaid-js/mermaid.git
				synced 2025-11-04 12:54:08 +01:00 
			
		
		
		
	chore: Replace Date.now with console.time
Co-authored-by: Alois Klink <alois@aloisklink.com>
This commit is contained in:
		@@ -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}', {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user