import { Bundlee } from "https://deno.land/x/pup@1.0.0-rc.7/plugins/web-interface/deps.ts";
Methods
private
bundleFiles(basePath: string, fileList: string[]): Promise<Record<string, Metadata>>Bundle files into a single JSON object.
private
getContentType(filePath: string): stringprivate
recursiveReaddir(path: string, extensionFilter?: string[]): Promise<string[]>Recursively read a directory and return a list of files.
bundle(): Promise<Record<string, Metadata>>
basePath: string,
path: string,
exts?: string[],
Bundle files from a directory into a single JSON object.
get(filePath: string): Promise<Metadata>
Get the content of a file from a JSON bundle.
has(filePath: string): boolean
Checks if a file exists in a JSON bundle.
import(fileUrl: string, importType?: "import" | "fetch" | "local")
Imports a bundle JSON file.
Used by the load()-factory
importAsModule(fileUrl: string)
Imports a bundle JSON file using the import()
function.
importLocal(fileUrl: string)
Imports a bundle JSON file from the local filesystem.
importRemote(fileUrl: string)
Imports a bundle JSON file using the fetch()
function.
preloadCache(): Promise<void>
Preloads the cache with all the files in the bundle.
restore(targetPath: string): Promise<void>
Restores all files in the bundle to the filesystem, including their modified time.