Skip to content

Commit

Permalink
chore: type check for both
Browse files Browse the repository at this point in the history
  • Loading branch information
vicary committed May 19, 2024
1 parent 2102bb0 commit fc0b2a2
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions dnt.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// Bundle src/mod.ts into both ESM and CJS format.
import { build, emptyDir } from "@deno/dnt";
import { build } from "@deno/dnt";
import pkg from "./deno.json" with { type: "json" };

await emptyDir("./dnt");
await Deno.remove("./dnt", { recursive: true }).catch(() => {});

await build({
entryPoints: ["./mod.ts"],
Expand Down Expand Up @@ -40,9 +40,10 @@ await build({
url: "https://github.com/sponsors/vicary",
},
},
postBuild() {
async postBuild() {
// steps to run after building and before running the tests
Deno.copyFileSync("LICENSE", "dnt/LICENSE");
Deno.copyFileSync("README.md", "dnt/README.md");
await Deno.copyFile("LICENSE", "dnt/LICENSE");
await Deno.copyFile("README.md", "dnt/README.md");
},
typeCheck: "both",
});

0 comments on commit fc0b2a2

Please sign in to comment.