-
Notifications
You must be signed in to change notification settings - Fork 0
/
dnt.ts
35 lines (33 loc) · 914 Bytes
/
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
import { build, emptyDir } from "https://deno.land/x/[email protected]/mod.ts";
import pkg from "./deno.json" assert { type: "json" };
await emptyDir("./npm");
await build({
entryPoints: ["./src/main.ts"],
outDir: "./npm",
shims: {
deno: false,
},
scriptModule: 'cjs',
test: false,
package: {
name: "@orama/chunker",
version: pkg.version,
description: "Split large texts into chunks with a maximum number of token. Split by fixed size or by sentence.",
license: "Apache 2.0",
repository: {
type: "git",
url: "git+https://github.com/oramasearch/chunker",
},
bugs: {
url: "https://github.com/oramasearch/chunker/issues",
},
author: {
name: "Michele Riva",
url: "https://github.com/MicheleRiva"
}
},
postBuild() {
Deno.copyFileSync("LICENSE.md", "npm/LICENSE.md");
Deno.copyFileSync("README.md", "npm/README.md");
},
});