Interactive ESM Template
- 14 Oct 2024
- 1 Minute to read
- Print
Interactive ESM Template
- Updated on 14 Oct 2024
- 1 Minute to read
- Print
Article summary
Did you find this summary helpful?
Thank you for your feedback
The ShuffleGame template is a fun example of how to write a large interactive brain-twister-game to show off what can be achieved in a HTML template.
- The game has two modes. One where the goal is to move the red tile to a highlighed area on the board and the other, a number-sorting game, where the goal is to end up with the numbered tiles ordered and the blank space in the lower right cell.
- The code-design is strictly Object Oriented.
- In modern browsers, (e.g. Chrome 61+), the template can be hosted without bundling, but we are WebPack'ing it with with a generic webpack_config.js which can be re-used for any template. It outputs to "template.js" which is the same as TS-bundling would do for a classic (namespaced, non-module) template. This means the same script can be used for zip'ing both.
Was this article helpful?