-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path_transform.ts
More file actions
50 lines (47 loc) · 1.09 KB
/
_transform.ts
File metadata and controls
50 lines (47 loc) · 1.09 KB
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
import { build, emptyDir } from "@deno/dnt";
import denoJson from "./deno.json" with { type: "json" };
const { imports, version } = denoJson;
const mtkrutoSpecifier = imports["@mtkruto/mtkruto"];
const mtkrutoVersion = mtkrutoSpecifier.split("^")[1];
await emptyDir("./dist");
await build({
entryPoints: [
{
kind: "bin",
name: "create-auth-string",
path: "./main.ts",
},
],
outDir: "./dist",
typeCheck: false,
test: false,
scriptModule: false,
compilerOptions: {
target: "ES2023",
lib: ["ESNext", "DOM", "ESNext.AsyncIterable"],
},
shims: {
prompts: true,
deno: true,
},
mappings: {
"./client.ts": "./client.node.ts",
},
packageManager: "pnpm",
package: {
name: "@mtkruto/create-auth-string",
version,
license: "MIT",
repository: {
type: "git",
url: "git+https://github.com/MTKruto/create-auth-string.git",
},
dependencies: {
"@mtkruto/node": mtkrutoVersion,
},
},
postBuild() {
Deno.copyFileSync("LICENSE", "dist/LICENSE");
Deno.copyFileSync("README.md", "dist/README.md");
},
});