-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.ts
39 lines (32 loc) · 1015 Bytes
/
build.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
import { assertEquals } from "https://deno.land/std@0.202.0/assert/mod.ts"
import { app } from "./mod.ts"
import { stringify } from "https://deno.land/std@0.210.0/dotenv/mod.ts"
console.log(
await app.request("/src/mod.ts")
)
const build = async (filename: string) => {
const res = await app.request(filename)
assertEquals(
res.status,
200,
)
}
const writeEnv = async (env: Record<string, string>) => {
await Deno.writeTextFile(".env", stringify(env))
}
const [ VERSION_LABEL ] = Deno.args
Deno.test("build", async () => {
await writeEnv({
VERSION_LABEL: VERSION_LABEL.slice(0, 7),
})
await build("/src/Entry.ts")
await build("/src/obj/mod.ts")
await build("/src/obj/EntryBrush.ts")
await build("/src/obj/EntryContainer.ts")
await build("/src/obj/EntrySprite.ts")
await build("/src/obj/EntryText.ts")
await build("/src/mod.ts")
await build("/src/Timer.ts")
await build("/src/util.ts")
await build("/deps/pixi.ts")
})