SilverBullet pivot to become an offline-first PWA (#403)
This commit is contained in:
@@ -4,7 +4,10 @@ import { walk } from "https://deno.land/std@0.165.0/fs/mod.ts";
|
||||
import { resolve } from "https://deno.land/std@0.165.0/path/mod.ts";
|
||||
import { mime } from "https://deno.land/x/mimetypes@v1.0.0/mod.ts";
|
||||
|
||||
const rootDir = resolve("website_build/fs");
|
||||
const rootDir = resolve("website_build/_fs");
|
||||
|
||||
const lastModifiedTimestamp = +Deno.env.get("LAST_MODIFIED_TIMESTAMP")! ||
|
||||
Date.now();
|
||||
|
||||
const allFiles: FileMeta[] = [];
|
||||
for await (
|
||||
@@ -18,7 +21,7 @@ for await (
|
||||
const s = await Deno.stat(fullPath);
|
||||
allFiles.push({
|
||||
name: fullPath.substring(rootDir.length + 1),
|
||||
lastModified: 1,
|
||||
lastModified: lastModifiedTimestamp,
|
||||
contentType: mime.getType(fullPath) || "application/octet-stream",
|
||||
size: s.size,
|
||||
perm: "rw",
|
||||
|
||||
Reference in New Issue
Block a user