Skip to content

Commit

Permalink
build(simulator): print to stdout building information
Browse files Browse the repository at this point in the history
Signed-off-by: Jérôme Benoit <[email protected]>
  • Loading branch information
Jérôme Benoit committed Oct 30, 2023
1 parent ab34592 commit 7820269
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions bundle.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
/* 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';

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'],
Expand Down Expand Up @@ -75,3 +78,4 @@ const sourcemap = !!isDevelopmentBuild;
],
});
})();
console.timeEnd('Build time');

0 comments on commit 7820269

Please sign in to comment.