Skip to content

Commit 702214c

Browse files
committed
recommendedLibraries, sampleDatasets
1 parent 30fc775 commit 702214c

File tree

3 files changed

+48
-15
lines changed

3 files changed

+48
-15
lines changed

src/client/main.js

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
import {inspect, inspectError} from "./inspect.js";
22
import {Runtime} from "./runtime.js";
3+
import * as recommendedLibraries from "./stdlib/recommendedLibraries.js";
4+
import * as sampleDatasets from "./stdlib/sampleDatasets.js";
35
import {registerDatabase, registerFile} from "./stdlib.js";
46
import {DatabaseClient, FileAttachment, Generators, Mutable, now, width} from "./stdlib.js";
57

@@ -10,21 +12,8 @@ const library = {
1012
FileAttachment: () => FileAttachment,
1113
Generators: () => Generators,
1214
Mutable: () => Mutable,
13-
_: () => import("npm:lodash").then((lodash) => lodash.default),
14-
aq: () => import("npm:arquero"),
15-
Arrow: () => import("npm:apache-arrow"),
16-
d3: () => import("npm:d3"),
17-
dot: () => import("./stdlib/dot.js").then((dot) => dot.default),
18-
htl: () => import("npm:htl"),
19-
html: () => import("npm:htl").then((htl) => htl.html),
20-
svg: () => import("npm:htl").then((htl) => htl.svg),
21-
Inputs: () => import("./stdlib/inputs.js"),
22-
L: () => import("./stdlib/leaflet.js"),
23-
mermaid: () => import("./stdlib/mermaid.js").then((mermaid) => mermaid.default),
24-
Plot: () => import("npm:@observablehq/plot"),
25-
SQLite: () => import("./stdlib/sqlite.js").then((sqlite) => sqlite.default),
26-
tex: () => import("./stdlib/tex.js").then((tex) => tex.default),
27-
topojson: () => import("npm:topojson-client")
15+
...recommendedLibraries,
16+
...sampleDatasets
2817
};
2918

3019
const runtime = new Runtime(library);
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
export const _ = () => import("npm:lodash").then((lodash) => lodash.default);
2+
export const aq = () => import("npm:arquero");
3+
export const Arrow = () => import("npm:apache-arrow");
4+
export const d3 = () => import("npm:d3");
5+
export const dot = () => import("./dot.js").then((dot) => dot.default);
6+
export const htl = () => import("npm:htl");
7+
export const html = () => import("npm:htl").then((htl) => htl.html);
8+
export const svg = () => import("npm:htl").then((htl) => htl.svg);
9+
export const Inputs = () => import("./inputs.js");
10+
export const L = () => import("./leaflet.js");
11+
export const mermaid = () => import("./mermaid.js").then((mermaid) => mermaid.default);
12+
export const Plot = () => import("npm:@observablehq/plot");
13+
export const SQLite = () => import("./sqlite.js").then((sqlite) => sqlite.default);
14+
export const tex = () => import("./tex.js").then((tex) => tex.default);
15+
export const topojson = () => import("npm:topojson-client");

src/client/stdlib/sampleDatasets.js

Lines changed: 29 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)