fix browser events in export html
This commit is contained in:
parent
fa72e4b928
commit
01e5a5c7e8
@ -52,6 +52,8 @@ export class HtmlExporter {
|
||||
|
||||
const gamelib = new Gamelib(console, new AssetProvider(), document.querySelector('canvas'));
|
||||
|
||||
gamelib.init();
|
||||
|
||||
window.karlkoder = {
|
||||
lib() {
|
||||
return gamelib.getAdapter();
|
||||
@ -65,7 +67,8 @@ ${js}
|
||||
<body>
|
||||
<canvas width="480" height="360"></canvas>
|
||||
</body>
|
||||
</html>`;
|
||||
</html>
|
||||
`.trim();
|
||||
|
||||
return html;
|
||||
}
|
||||
|
@ -28,7 +28,7 @@ export function minifyJs(code) {
|
||||
.map((line) =>
|
||||
line
|
||||
.replace(/\/\/.+$/, "")
|
||||
.replace(/\) \{/, "){")
|
||||
.replace(/\) \{\n/, "){")
|
||||
.replace(/ = /g, "=")
|
||||
.trim()
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user