Skip to content

Commit 6b77ba8

Browse files
committed
chore: update dnt task
1 parent 1d21bfd commit 6b77ba8

File tree

2 files changed

+216
-22
lines changed

2 files changed

+216
-22
lines changed

build/build_npm.ts

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { build, emptyDir } from "https://deno.land/x/dnt@0.33.1/mod.ts";
1+
import { build, emptyDir } from "https://deno.land/x/dnt@0.40.0/mod.ts";
22

33
// delete previous build
44
await emptyDir("./npm");
@@ -16,7 +16,6 @@ await build({
1616
outDir: "./npm",
1717
shims: {
1818
deno: true, // for Deno namespace
19-
undici: true, // for fetch
2019
},
2120
// package.json properties
2221
package: {
@@ -35,13 +34,10 @@ await build({
3534
engines: {
3635
node: ">=14",
3736
},
38-
devDependencies: {
39-
"@types/node-fetch": "^2.5.7",
40-
},
37+
},
38+
postBuild() {
39+
Deno.copyFileSync("LICENSE", "npm/LICENSE");
40+
Deno.copyFileSync("README.md", "npm/README.md");
41+
Deno.copyFileSync("build/.releaserc.json", "npm/.releaserc.json");
4142
},
4243
});
43-
44-
// post build steps
45-
Deno.copyFileSync("LICENSE", "npm/LICENSE");
46-
Deno.copyFileSync("README.md", "npm/README.md");
47-
Deno.copyFileSync("build/.releaserc.json", "npm/.releaserc.json");

0 commit comments

Comments
 (0)