This repository was archived by the owner on Dec 13, 2022. It is now read-only.
Allow Uglifier options in assets.yml#13
Open
bruno-c wants to merge 5 commits intoSponsorPay:masterfrom
Open
Conversation
Signed-off-by: Ilya Shindyapin <ilya@shindyapin.com>
Signed-off-by: Ilya Shindyapin <ilya@shindyapin.com>
"Compiled on" date option Updated Bundler dependencies in gemspec
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I've added a small amount of code + test to allow passing options to Uglifier.
In assets.yaml:
optionsis a bit generic for the key but since the CSS minifier has no options to speak of, I thought it was the right name to use.The only other bit of code is a recursive function that takes the options hash and converts string keys to symbols (as expected by Uglifier). Entering the symbols in the YAML is awkward, so this seemed to be a better option.
Thanks for Evax. It's the simplest thing that could possibly work when it comes to minifying / concatenation.