forked from kt3k/license-checker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdnt.ts
51 lines (47 loc) · 1.29 KB
/
dnt.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
40
41
42
43
44
45
46
47
48
49
50
51
// Copyright 2020-2022 Yoshiya Hinosawa. All rights reserved. MIT license.
import { build } from "https://deno.land/x/[email protected]/mod.ts";
import { copy } from "https://deno.land/[email protected]/fs/copy.ts";
await Deno.remove("npm", { recursive: true }).catch((_) => {});
await copy("testdata", "npm/script/testdata", { overwrite: true });
await copy("testdata", "npm/esm/testdata", { overwrite: true });
await copy("README.md", "npm/README.md", { overwrite: true });
await build({
entryPoints: ["./lib.ts", {
kind: "bin",
name: "license_checker",
path: "./main.ts",
}],
shims: {
deno: true,
undici: true,
},
mappings: {
"./serve.ts": "serve_node.ts",
},
outDir: "./npm",
typeCheck: false,
declaration: true,
test: true,
compilerOptions: {
lib: ["es2021", "dom"],
},
package: {
// package.json properties
name: "@kt3k/license-checker",
version: "3.2.2",
description: "📄 CLI tool for checking license headers in files",
license: "MIT",
repository: {
type: "git",
url: "git+https://github.com/kt3k/deno_license_checker.git",
},
bugs: {
url: "https://github.com/kt3k/deno_license_checker/issues",
},
},
});
await Deno.writeTextFile(
"npm/.npmignore",
"esm/testdata/\numd/testdata/\n",
{ append: true },
);