LightSys/centrallix

Reorganize JavaScript module structure

Opened this issue · 0 comments

Currently, Centrallix's JavaScript is structured rather like C code - lots of functions in the global namespace, with module prefixes on function names. This system should be updated to be more clean, standard, and modern.

One suggested structure is outlined here - essentially, moving Centrallix functionality into a structured global variable $CX.

Alternatively, could it be possible to use ES6 modules + imports instead (with standard JS objects, functions, classes, etc)? The main issue with this is that supporting older / less standard browsers would require setting up Babel/Webpack/some other transpilation and/or build toolchain (see #22).