Skip to content

Commit 05d1f95

Browse files
committed
chore(deps): Refactor all deps into deps.ts
1 parent 7ad97ef commit 05d1f95

5 files changed

Lines changed: 10 additions & 15 deletions

File tree

deps.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
export { parse as parseFlags } from "https://deno.land/std@0.177.0/flags/mod.ts";
12
export * as http from "https://deno.land/std@0.177.0/http/server.ts";
23
export * as file_server from "https://deno.land/std@0.177.0/http/file_server.ts";
34
export {
@@ -9,6 +10,5 @@ export {
910

1011
export * as entities from "https://deno.land/x/html_entities@v1.0/lib/xml-entities.js";
1112

12-
// these are also imported in other places
1313
export { SubProcess, type SubprocessErrorData } from "https://crux.land/4KsAxM#sub-process";
1414
export { filesize } from "https://crux.land/6wZ5Sz#filesize@v1";

feat/dependencies-of/api.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,13 @@ import {
22
entities,
33
readableStreamFromReader,
44
readableStreamFromIterable,
5+
SubProcess,
6+
type SubprocessErrorData,
57
} from "../../deps.ts";
68

79
import { templateHtml, makeErrorResponse, HtmlHeaders } from '../../lib/request-handling.ts';
810
import { findModuleSlug, resolveModuleUrl } from "../../lib/resolve.ts";
9-
import {
10-
computeGraph, renderGraph,
11-
SubProcess, SubprocessErrorData,
12-
} from "./compute.ts";
11+
import { computeGraph, renderGraph } from "./compute.ts";
1312

1413
export async function *handleRequest(req: Request, modSlug: string, args: URLSearchParams) {
1514
if (modSlug == '') {

feat/dependencies-of/cli.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
#!/usr/bin/env -S deno run --allow-run=deno,dot
22

3-
import * as Flags from "https://deno.land/std@0.177.0/flags/mod.ts";
4-
const flags = Flags.parse(Deno.args, {
3+
import { parseFlags } from "../../deps.ts";
4+
import { computeGraph, renderGraph } from "./compute.ts";
5+
6+
const flags = parseFlags(Deno.args, {
57
alias: {
68
output: ['o'],
79
},
@@ -11,8 +13,6 @@ if (flags._.length !== 1) {
1113
Deno.exit(4);
1214
}
1315

14-
import { computeGraph, renderGraph } from "./compute.ts";
15-
1616
const modUrl = `${flags._[0]}`;
1717
if (flags.output) {
1818

feat/dependencies-of/compute.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
import { SubProcess } from "https://crux.land/2isPVe#sub-process";
2-
export { SubProcess };
3-
export type { SubprocessErrorData } from "https://crux.land/2isPVe#sub-process";
4-
1+
import { SubProcess } from "../../deps.ts";
52
import { DenoInfo } from "../../lib/types.ts";
63
import { computeDependencies } from "../../lib/module-map.ts";
74

lib/module-map.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
import { filesize } from "https://crux.land/6wZ5Sz#filesize@v1";
2-
1+
import { filesize } from "../deps.ts";
32
import { CodeModule, DenoInfo, DenoModule } from "./types.ts";
43
import * as registries from "./module-registries.ts";
54

0 commit comments

Comments
 (0)