-
Notifications
You must be signed in to change notification settings - Fork 0
Use Uglifier Harmony mode #62
base: master
Are you sure you want to change the base?
Conversation
ac41b4d
to
7858460
Compare
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.
Let's remove the unneeded magic comment and remove the comment, then merge it.
@@ -0,0 +1,7 @@ | |||
# frozen_string_literal: true |
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.
There are no string literals in this file.
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.
I know, but our Rubocop ruleset makes the magic comment mandatory 🤷♂️
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.
OK, maybe we could reconsider whilelisting rules vs. blacklisting? ;-)
This commit overrides the default Rails configuration to use the Harmony mode of Uglifier, which support ES6 syntax, as mentioned in their README file: https://github.com/lautis/uglifier#es6--es2015--harmony-mode
7858460
to
60a228f
Compare
I was going to merge, but I'll avoid since the build is "broken". |
Hrm, it's interesting 🤔 The current offense is actually due to our codestyle disabling It expects us to rewrite this Rails.application.config.assets.js_compressor = Uglifier.new(harmony: true) if Rails.application.config.assets.js_compressor == :uglifier Which is actually obviously too long 🤷♂️ I see 3 options here:
What do you think? |
I agree that Rubocop suggestion isn't acceptable here :-(
So personally, I'd go with first option. |
This commit overrides the default Rails configuration to use the Harmony
mode of Uglifier, which support ES6 syntax, as mentioned in their README
file:
https://github.com/lautis/uglifier#es6--es2015--harmony-mode