(html, scripts)
| 117 | } |
| 118 | |
| 119 | async function inlineScripts(html, scripts) { |
| 120 | let result = html; |
| 121 | for (const { placeholder, code } of scripts) { |
| 122 | result = result.replace(placeholder, `<script>\n${code}\n</script>`); |
| 123 | } |
| 124 | return result; |
| 125 | } |
| 126 | |
| 127 | async function run(command, args) { |
| 128 | await new Promise((resolve, reject) => { |