FreezingMoon / AncientBeast

The Turn Based Strategy Game/eSport. Master your beasts! 🐺
https://AncientBeast.com
GNU Affero General Public License v3.0
1.66k stars 572 forks source link

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

Open DreadKnight opened 7 years ago

DreadKnight commented 7 years ago

The deploy/index.html 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 commented 5 years ago

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 commented 5 years ago

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...

ktiedt commented 5 years ago

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.

DreadKnight commented 5 years ago

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 commented 5 years ago

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 commented 4 years ago

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