///|
let build_entry_script =
#|
///|
fn source_path_to_string(path : SourcePath) -> String {
"\{path}"
}
///|
fn has_build_entry_script(html : String) -> Bool {
html.contains("src=\"./index.js\"") ||
html.contains("src='./index.js'") ||
html.contains("./index.js")
}
///|
fn inject_build_entry_script(html : String) -> String {
guard !has_build_entry_script(html) else { html }
let patch = build_entry_script + "\n"
match html.rev_find("") {
Some(index) => html[:index].to_owned() + patch + html[index:].to_owned()
None =>
match html.rev_find("") { Some(index) => html[:index].to_owned() + patch + html[index:].to_owned() None => match html.rev_find("