AncientBeast icon indicating copy to clipboard operation
AncientBeast copied to clipboard

split the game index into multiple files [bounty: 20 XTR]

Open DreadKnight opened this issue 8 years ago • 6 comments

The src/index.ejs should be split into stand alone files that get concatenated on webpack build as it contains too many things inside it, making it kinda hard to deal with. The new files should be in src folder.

DreadKnight avatar Mar 22 '17 05:03 DreadKnight

It seems that webcomponents are a nice way to approach this https://en.wikipedia.org/wiki/Web_Components#HTML_Import Not sure if Firefox supports them already (while in draft phase).

DreadKnight avatar Nov 05 '18 00:11 DreadKnight

Although polymer improves on top of that and makes use of polyfills. https://www.polymer-project.org - We already have a stale branch for migrating the game's UI to it...

DreadKnight avatar Nov 05 '18 00:11 DreadKnight

HTML import was killed by Firefox, the new defacto standard is to simple use es6 modules and include HTML templates in your js files for now...

The old branch isnt worth continuing, but it's possible we can use a different tool that might attract developers looking for experience.

Vuejs which also supports web components and has a larger community.

ktiedt avatar Nov 05 '18 01:11 ktiedt

Freaking FF, sigh. JS still kinda confuses me overall. Wanted something simple and standard to rewrite the website(s) as well, ditching most of the pointless php. Will look more into this webcomponents/polymer/vue.

DreadKnight avatar Nov 05 '18 01:11 DreadKnight

Ideally the index.html file will get split when HTML Elements spec receives mainstream adoption. Proposal - https://github.com/w3c/webcomponents/issues/645#issuecomment-343601237 Discussion - https://github.com/w3c/webcomponents/issues?q=is%3Aissue+is%3Aopen+html+modules+label%3Amodules

DreadKnight avatar Nov 13 '18 15:11 DreadKnight

This should probably be on hold until #1624 will be implemented, along with #1616 in order to avoid any merge conflicts.

DreadKnight avatar Jul 07 '20 12:07 DreadKnight