-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.ts
37 lines (33 loc) · 806 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
import { build, emptyDir } from "https://deno.land/x/dnt@0.31.0/mod.ts";
await emptyDir("./npm");
await build({
packageManager: "yarn",
entryPoints: ["./mod.ts"],
outDir: "./npm",
shims: {
// see JS docs for overview and more options
deno: true,
crypto: true,
},
package: {
// package.json properties
name: "miauth-js",
version: Deno.args[0],
description: "MiAuth wrapper for Deno/Node.js",
license: "MIT",
repository: {
type: "git",
url: "git+https://github.com/Comamoca/miauth.js.git",
},
bugs: {
url: "https://github.com/Comamoca/miauth.js/issues",
},
},
});
function cp2npm(path: string) {
Deno.copyFileSync(path, `npm/${path}`);
}
// post build steps
cp2npm("LICENSE");
cp2npm("README.md");
cp2npm("README.ja.md");