Skip to content
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
bruno-c:uglify-options
Open

Allow Uglifier options in assets.yml#13
bruno-c wants to merge 5 commits intoSponsorPay:masterfrom
bruno-c:uglify-options

Conversation

@bruno-c
Copy link
Copy Markdown

@bruno-c bruno-c commented Jul 27, 2012

I've added a small amount of code + test to allow passing options to Uglifier.

In assets.yaml:

options:
  max_line_length: 800
  beautify_options:
    indent_level: 4

options is 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.

Bruno Carriere and others added 5 commits July 27, 2012 14:07
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants