Skip to content

Commit 3f1dcd1

Browse files
committed
create empty file instead of error
1 parent dc1101d commit 3f1dcd1

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

build/dev.ts

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ import { BuildOptions, context } from "esbuild";
66
import { AsyncDisposableStack } from "../misc/async_disposable_stack.ts";
77
import { OPTIONS } from "./config.ts";
88

9+
const DICTIONARY = new URL("../dictionary/dictionary.ts", import.meta.url);
10+
911
const BUILD_OPTIONS: BuildOptions = {
1012
...OPTIONS,
1113
minify: false,
@@ -44,14 +46,8 @@ async function watchDictionary(): Promise<number> {
4446
return status.code;
4547
}
4648
async function main(): Promise<void> {
47-
if (
48-
!await exists(new URL("../dictionary/dictionary.ts", import.meta.url))
49-
) {
50-
const Dictionary = await import("../dictionary/build.ts");
51-
if (!await Dictionary.build()) {
52-
Deno.exitCode = 1;
53-
return;
54-
}
49+
if (!await exists(DICTIONARY)) {
50+
await Deno.create(DICTIONARY);
5551
}
5652
const statusCodePromise = watchDictionary();
5753
await using _ = await watchMain();

0 commit comments

Comments
 (0)