feature: support .spa files for Single Page Apps
This commit is contained in:
parent
604090d8b8
commit
9fc91f4cf4
11 changed files with 329 additions and 8 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue