-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
minify leaflet scripts using uglifier #8159
Conversation
Codecov Report
@@ Coverage Diff @@
## main #8159 +/- ##
==========================================
+ Coverage 82.10% 82.22% +0.12%
==========================================
Files 100 100
Lines 5751 5751
==========================================
+ Hits 4722 4729 +7
+ Misses 1029 1022 -7
|
@jywarren @cesswairimu can you kindly review? Thanks ✌️ |
@@ -16,6 +16,8 @@ | |||
# Compress JavaScripts and CSS | |||
config.assets.compress = true | |||
config.assets.js_compressor = Uglifier.new(harmony: true) | |||
Uglifier.new(harmony: true).compile(File.read("public/lib/leaflet-environmental-layers/dist/LeafletEnvironmentalLayers.js")) | |||
Uglifier.new(harmony: true).compile(File.read("public/lib/leaflet-environmental-layers/lib/glify.js")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will these then be grabbed automatically by asset pipeline? Awesome, thank you @Tlazypanda you're really an expert in all this!!!
@jywarren @cesswairimu on checking the performance the Uglifier scripts to be minified are not getting minified #8159 but locally they are so maybe fetching from cache can we do a manual rake assets:precompile (possibly after removing the assets folder once) and then letting it build a fresh assets folder 😅 |
Perhaps you could write this into a Rails migration, sit hat it automatically runs upon publishing to stable and production? What do you think? I'm happy to help with that if you want to open a PR ! |
Fixes #8158
Minified leaflet scripts using Uglifier.
rake test
@publiclab/reviewers
for help, in a comment belowScreenshots
Minify js suggestion not present anymore