-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtransform.ts
72 lines (69 loc) · 1.58 KB
/
transform.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 "jsr:@deno/dnt@0.41.3";
const version = Deno.args[0];
if (!version) {
console.error("Version not provided.");
Deno.exit(1);
}
await emptyDir("./dist");
await build({
entryPoints: [
"mod.ts",
{
name: "./1_utilities",
path: "1_utilities.ts",
},
],
outDir: "./dist",
typeCheck: false,
test: true,
shims: {
custom: [{
package: {
name: "@deno/shim-deno",
version: "~0.19.2",
},
globalNames: ["Deno"],
}],
crypto: true,
webSocket: true,
},
compilerOptions: {
lib: ["ESNext", "DOM", "ESNext.AsyncIterable"],
},
mappings: {
"./storage/2_storage_local_storage.ts":
"./storage/2_storage_local_storage.node.ts",
"./connection/1_connection_tcp.ts": "./connection/1_connection_tcp.node.ts",
},
packageManager: "pnpm",
package: {
name: "@mtkruto/node",
version,
description: "MTKruto for Node.js",
author: "Roj <rojvv@icloud.com>",
license: "LGPL-3.0-or-later",
repository: {
type: "git",
url: "git+https://github.com/MTKruto/MTKruto.git",
},
dependencies: {
"node-localstorage": "^3.0.5",
},
devDependencies: {
"@types/node-localstorage": "^1.3.3",
},
},
postBuild() {
Deno.copyFileSync("COPYING", "dist/COPYING");
Deno.copyFileSync("COPYING.LESSER", "dist/COPYING.LESSER");
Deno.copyFileSync("README.md", "dist/README.md");
},
filterDiagnostic(diagnostic) {
if (
diagnostic.file?.fileName.endsWith("fmt/colors.ts")
) {
return false;
}
return true;
},
});