diff --git a/Dockerfile b/Dockerfile index 7060b4c3..d4244f7f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -46,6 +46,9 @@ ENV SB_FOLDER /space # Copy the bundled version of silverbullet into the container ADD ./dist/silverbullet.js /silverbullet.js +# Precache any remaining dependencies +RUN deno cache /silverbullet.js + # As well as the docker-entrypoint.sh script ADD ./docker-entrypoint.sh /docker-entrypoint.sh diff --git a/build_bundle.ts b/build_bundle.ts index 21caf3e8..5d0ba043 100644 --- a/build_bundle.ts +++ b/build_bundle.ts @@ -14,6 +14,9 @@ await esbuild.build({ sourcemap: false, logLevel: "error", minify: true, + external: [ + "https://deno.land/std@*", + ], plugins: denoPlugins({ configPath: new URL("./deno.json", import.meta.url).pathname, }), diff --git a/deno.json b/deno.json index 5787cc88..0edd7afc 100644 --- a/deno.json +++ b/deno.json @@ -137,6 +137,7 @@ "@std/io/read-all": "jsr:@std/io@^0.224.3/read-all", "@std/path": "jsr:@std/path@^1.0.2", "@std/testing": "jsr:@std/testing@^0.225.3", + "@std/yaml": "jsr:@std/yaml@^1.0.5", "cliffy/": "https://deno.land/x/cliffy@v1.0.0-rc.4/", "crelt": "https://esm.sh/crelt@1.0.6", "denosass": "https://deno.land/x/denosass@1.0.6/mod.ts", diff --git a/lib/deps_server.ts b/lib/deps_server.ts index 6dc57483..4b1490ce 100644 --- a/lib/deps_server.ts +++ b/lib/deps_server.ts @@ -1,9 +1,9 @@ // Remember to keep in sync with deno.json ! // We have to use different deps for client and server as esbuild doesn't // support wildcard exporting. See https://github.com/evanw/esbuild/issues/1420 -export { globToRegExp } from "https://deno.land/std@0.165.0/path/glob.ts"; -export { walk } from "https://deno.land/std@0.165.0/fs/mod.ts"; -export * as path from "https://deno.land/std@0.165.0/path/mod.ts"; -export { mime } from "https://deno.land/x/mimetypes@v1.0.0/mod.ts"; -export * as YAML from "https://deno.land/std@0.184.0/yaml/mod.ts"; +export { globToRegExp } from "@std/path"; +export { walk } from "@std/fs"; +export * as path from "@std/path"; +export { mime } from "mimetypes"; +export * as YAML from "@std/yaml"; export { Cron } from "https://deno.land/x/croner@4.4.1/src/croner.js";