Skip to content

Commit

Permalink
Update build.config.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
Mqxx committed Jan 20, 2024
1 parent 48d2888 commit c5e5afb
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions build.config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/// <reference lib="deno.ns" />
import * as esbuild from 'https://deno.land/x/esbuild@v0.19.11/mod.js';
import esbuildPluginSass from 'https://deno.land/x/esbuild_plugin_sass@v0.4.2/mod.ts';
import { bold } from 'https://deno.land/std@0.211.0/fmt/colors.ts';
import { green } from 'https://deno.land/std@0.211.0/fmt/colors.ts';
import { parseArgs } from 'https://deno.land/std@0.211.0/cli/parse_args.ts';

const args = parseArgs<{
Expand All @@ -10,7 +10,9 @@ const args = parseArgs<{
logLevel: esbuild.LogLevel
}>(Deno.args);

console.log(bold('Build process started.'));
console.log('Build process started.');

const timestamp = Date.now()

Promise.all([
esbuild.context({
Expand Down Expand Up @@ -42,7 +44,7 @@ Promise.all([
],
}).then((context) => {return args.watch ? context.watch() : context.dispose()}),
]).then(() => {
console.log(bold('Build process finished.'));
console.log(green(`Build process finished in ${(Date.now() - timestamp).toString()}ms.`));

if (!args.watch) {
esbuild.stop();
Expand Down

0 comments on commit c5e5afb

Please sign in to comment.