-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdnt.ts
72 lines (68 loc) · 1.69 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
import { build, emptyDir } from "@deno/dnt";
import metadata from "./deno.json" with { type: "json" };
await emptyDir("./npm");
const importMap = ".dnt-import-map.json";
await Deno.writeTextFile(
importMap,
JSON.stringify({
imports: {
...metadata.imports,
"markdown-it": metadata.imports["markdown-it-impl"],
"markdown-it/": `npm:/${
metadata.imports["markdown-it-impl"].substring(4)
}/`,
},
}),
);
await build({
package: {
// package.json properties
name: "@fedify/markdown-it-mention",
version: Deno.args[0] ?? metadata.version,
description:
"A markdown-it plugin that parses and renders Mastodon-style @mentions.",
keywords: [
"markdown",
"markdown-it",
"markdown-it-plugin",
"Mastodon",
"mention",
"fediverse",
],
license: "MIT",
author: {
name: "Hong Minhee",
email: "[email protected]",
url: "https://hongminhee.org/",
},
homepage: "https://github.com/fedify-dev/markdown-it-mention",
repository: {
type: "git",
url: "git+https://github.com/fedify-dev/markdown-it-mention.git",
},
bugs: {
url: "https://github.com/fedify-dev/markdown-it-mention/issues",
},
funding: [
"https://github.com/sponsors/dahlia"
],
devDependencies: {
"@types/markdown-it": "^14.1.1",
},
},
outDir: "./npm",
entryPoints: ["./mod.ts"],
importMap,
shims: {
deno: true,
},
typeCheck: "both",
declaration: "separate",
declarationMap: true,
test: true,
async postBuild() {
await Deno.copyFile("LICENSE", "npm/LICENSE");
await Deno.copyFile("README.md", "npm/README.md");
},
});
// cSpell: ignore Minhee