blob: 180b30564ef602bdb2a33f66315238784cb1a7bb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
/**
* Generates the theme preload script content.
* Run this to get the script that should be embedded in index.html.
*/
import { generatePreloadScript, generatePreloadScriptFormatted } from "../src/theme/preload"
const formatted = process.argv.includes("--formatted")
if (formatted) {
console.log("<script>")
console.log(generatePreloadScriptFormatted())
console.log("</script>")
} else {
console.log("<script>" + generatePreloadScript() + "</script>")
}
|