-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathglobal.ts
More file actions
32 lines (26 loc) · 786 Bytes
/
global.ts
File metadata and controls
32 lines (26 loc) · 786 Bytes
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
import { bold, gray, yellow } from "./colors.ts";
import * as transporter from "./mod.ts";
import pkg from "./deno.json" with { type: "json" };
Object.assign(globalThis, { transporter }, transporter);
// if ("serviceWorker" in navigator) {
// navigator.serviceWorker.register("/sw.ts");
// }
if (typeof document !== "undefined") {
fetch("/transporter.txt").then((res) => res.text()).then((res) => {
console.log(bold(gray(res)));
Object.assign(globalThis, {
TransporterLogo: res,
});
});
}
console.log(
"\n\t" +
bold(yellow(pkg.name)) + " " +
gray(pkg.version) + "\n\n",
);
declare global {
const readable: typeof transporter.readable;
const writable: typeof transporter.writable;
const transform: typeof transporter.transform;
}
export {};