feature: support .spa files for Single Page Apps

This commit is contained in:
Andy Burke 2025-11-20 16:44:49 -08:00
parent 604090d8b8
commit 9fc91f4cf4
11 changed files with 329 additions and 8 deletions

View file

@ -18,7 +18,7 @@ const replaceAsync = async (str: string, regex: RegExp, asyncFn: (match: any, ..
};
const SSI_REGEX: RegExp = /\<\!--\s+#include\s+(?<type>.*?)\s*=\s*["'](?<location>.*?)['"]\s+-->/mg;
async function load_html_with_ssi(html_file: string): Promise<string> {
export async function load_html_with_ssi(html_file: string): Promise<string> {
const html_file_content: string = await Deno.readTextFile(html_file);
const processed: string = await replaceAsync(
html_file_content,