From 78202698774ff18a749e3bd0a04418bc23ae0137 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Mon, 30 Oct 2023 21:29:12 +0100 Subject: [PATCH] build(simulator): print to stdout building information MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- bundle.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bundle.js b/bundle.js index a3b0ad68..dd6a46ca 100644 --- a/bundle.js +++ b/bundle.js @@ -1,6 +1,7 @@ /* eslint-disable n/no-unpublished-import */ import { env } from 'node:process'; +import chalk from 'chalk'; import { build } from 'esbuild'; import { clean } from 'esbuild-plugin-clean'; import { copy } from 'esbuild-plugin-copy'; @@ -8,6 +9,8 @@ import { copy } from 'esbuild-plugin-copy'; const isDevelopmentBuild = env.BUILD === 'development'; const sourcemap = !!isDevelopmentBuild; +console.info(chalk.green(`Building in ${isDevelopmentBuild ? 'development' : 'production'} mode`)); +console.time('Build time'); (async () => { await build({ entryPoints: ['./src/start.ts', './src/charging-station/ChargingStationWorker.ts'], @@ -75,3 +78,4 @@ const sourcemap = !!isDevelopmentBuild; ], }); })(); +console.timeEnd('Build time'); -- 2.34.1