-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild_npm.ts
35 lines (32 loc) · 883 Bytes
/
build_npm.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
// ex. scripts/build_npm.ts
import { build, emptyDir } from "https://deno.land/x/dnt/mod.ts";
await emptyDir("./npm");
await build({
entryPoints: ["./mod.js"],
scriptModule: false,
typeCheck: false,
test: false,
declaration: false,
outDir: "./npm",
shims: {
// see JS docs for overview and more options
deno: true,
},
package: {
// package.json properties
name: "esbuild-plugin-bookmarklet",
version: Deno.args[0],
description: "An esbuild plugin to generate bookmarklets!",
license: "GPL-v3.0-or-later",
repository: {
type: "git",
url: "git+https://github.com/reesericci/esbuild-bookmarklet.git",
},
bugs: {
url: "https://github.com/reesericci/esbuild-bookmarklet/issues",
},
},
});
// post build steps
Deno.copyFileSync("LICENSE", "npm/LICENSE");
Deno.copyFileSync("README.md", "npm/README.md");