SUSE-Enceladus / blue-horizon

web-based user interface to terraforming the public cloud
GNU General Public License v3.0
11 stars 8 forks source link

Eliminate unexpected production requirement of nodejs for assets #196

Closed bear454 closed 3 years ago

bear454 commented 3 years ago

Some of our JS was written in ES6, which required explicitly activating Uglifier in the production environment, in order to compress assets. Uglifier requires node.js, so this forced node to be a dependency in production.

In reality,all the assets are precompiled, so we shouldn't need any asset pipeline components in production.

In order to get back to this state, ES6 code was machine translated, via Babel, to ES5, then the original compressor command restored.

codecov[bot] commented 3 years ago

Codecov Report

Merging #196 (e83e855) into master (fd51121) will not change coverage. The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##            master      #196   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           24        24           
  Lines          711       711           
=========================================
  Hits           711       711           

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update fd51121...e83e855. Read the comment docs.

bear454 commented 3 years ago

That's the same output I used with babel, but if you have a different JS version to provide, please send it to me, or submit it in a separate PR. I don't want to include a comment about using babel; I don't want to rely on it. I will add a note that ES6 is not acceptable at this time.