john-science / DecafMUD

Web-based MUD Client for the Discworld MUD
MIT License
2 stars 2 forks source link

Improve JS build system - Google Closure #8

Open john-science opened 5 years ago

john-science commented 5 years ago

I would like to compile down the JavaScript in this project by compiling down the JavaScript using Google Closure. This would have several benefits:

  1. Makes it easier to know which browsers (and versions) we support.
  2. Makes the client faster for players to download and use.
  3. Frees me from worrying about the data size of all my comments and variable names.
  4. Would help me find JS bugs before they happen.
john-science commented 5 years ago

Here is a handy link to the Closure JS Compliler:

https://github.com/google/closure-compiler

john-science commented 5 years ago

While working on compiling the JS code in this project I stumbled upon a design detail I hadn't seen before... the JavaScript builds "require" statements on the fly, using local file paths that are built from config strings. So... I need to nuke all that before the build system possible / reasonable.