We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 473f4ba commit de68fb0Copy full SHA for de68fb0
build/build.ts
@@ -9,17 +9,14 @@ const BUILD_OPTIONS: ESBuild.BuildOptions = {
9
minify: true,
10
define: { LIVE_RELOAD: "false" },
11
};
12
-async function main(): Promise<void> {
+if (import.meta.main) {
13
const start = performance.now();
14
- if (!await Dictionary.build()) {
+ if (await Dictionary.build()) {
15
+ await ESBuild.build(BUILD_OPTIONS);
16
+ const end = performance.now();
17
+ // deno-lint-ignore no-console
18
+ console.log(`Total time took: ${Math.floor(end - start)}ms`);
19
+ } else {
20
Deno.exitCode = 1;
- return;
21
}
- await ESBuild.build(BUILD_OPTIONS);
- const end = performance.now();
- // deno-lint-ignore no-console
- console.log(`Total time took: ${Math.floor(end - start)}ms`);
22
-}
23
-if (import.meta.main) {
24
- await main();
25
0 commit comments