Support AOT-built static assets (#1999)
Creates a static folder under `config.build.outDir` during AOT build. Serves any static files that are found there. --------- Co-authored-by: Marvin Hagemeister <marvin@deno.com>
This commit is contained in:
co-authored by
Marvin Hagemeister
parent
d655386617
commit
264f3073bd
@@ -449,6 +449,19 @@ async function spawnServer(
|
||||
return { serverProcess, lines, address, output };
|
||||
}
|
||||
|
||||
export async function recreateFolder(folderPath: string) {
|
||||
try {
|
||||
await Deno.remove(folderPath);
|
||||
} catch {
|
||||
// ignore
|
||||
}
|
||||
try {
|
||||
await Deno.mkdir(folderPath, { recursive: true });
|
||||
} catch {
|
||||
// ignore
|
||||
}
|
||||
}
|
||||
|
||||
export async function runBuild(fixture: string) {
|
||||
const outDir = path.join(path.dirname(fixture), "_fresh");
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user