X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=bundle.js;h=dd6a46ca4f42f8671fab35beda34012ba54292a7;hb=d71ce3fa734fcefeb3dce31d78968b847c625c92;hp=708a4de99dc246f14658f5acd2a02957ec7dc5f2;hpb=ae2f5292bc112c82d4425df26da77dd8e3f6667b;p=e-mobility-charging-stations-simulator.git diff --git a/bundle.js b/bundle.js index 708a4de9..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'], @@ -24,12 +27,13 @@ const sourcemap = !!isDevelopmentBuild; 'http-status-codes', 'just-merge', 'logform', - 'mnemonist', + 'mnemonist/*', 'mongodb', 'node:*', 'poolifier', 'tar', 'winston', + 'winston/*', 'winston-daily-rotate-file', 'ws', ], @@ -74,3 +78,4 @@ const sourcemap = !!isDevelopmentBuild; ], }); })(); +console.timeEnd('Build time');