include cssom in benchmarks

This commit is contained in:
Matthew Griffith 2019-07-07 10:50:25 -04:00
parent 77517c0e4e
commit d2934dad5a
2 changed files with 4 additions and 0 deletions

View File

@ -132,6 +132,7 @@ async function write_results(allResults) {
var item = instances[i]
write_entrypoint(item)
var template = fs.readFileSync("./benchmarks/runtime/template/run.html")
var cssom = fs.readFileSync("./experiments/virtual-css/cssom.js")
// we embed the compiled js to avoid having to start a server to read the app.
await compileToString(["tmp/Main.elm"], { optimize: true, cwd: "./benchmarks" }).then(function (compiled_elm_code) {
const compiled = eval(`\`${template}\``)

View File

@ -4,6 +4,9 @@
<meta charset="UTF-8">
<title>Main</title>
<script>
${cssom}
</script>
<script>
${compiled_elm_code}
</script>
</head>