Skip to content

Commit

Permalink
Use cleaner import/export mechnism instead of using passing a global …
Browse files Browse the repository at this point in the history
…const

Signed-off-by: yzamir <kobi.zamir@gmail.com>
  • Loading branch information
yaacov authored and sleviim committed Sep 10, 2023
1 parent 8088f57 commit 5b86d4e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
2 changes: 1 addition & 1 deletion rose/web/game.js
Original file line number Diff line number Diff line change
Expand Up @@ -438,4 +438,4 @@ const Config = {
finish_line_duration: 5
};

const ROSE = new App();
export const ROSE = new App();
9 changes: 3 additions & 6 deletions rose/web/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,9 @@ <h2>Unsupported browser</h2>
</canvas>
</div>

<script src="game.js"></script>

<script>
document.addEventListener("DOMContentLoaded", function() {
ROSE.ready();
});
<script type="module">
import { ROSE } from './game.js';
ROSE.ready();
</script>
</body>
</html>

0 comments on commit 5b86d4e

Please sign in to comment.