Skip to content

Commit dd4191a

Browse files
authored
Merge pull request #326 from bouk/fix-uglifier-comments-default-3.x
Fix uglifier comment stripping default
2 parents 2702b33 + 2a1d937 commit dd4191a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/sprockets/uglifier_compressor.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def initialize(options = {})
4141
options[:copyright] ||= false
4242
else
4343
# Uglifier >= 2.x
44-
options[:copyright] ||= :none
44+
options[:comments] ||= :none
4545
end
4646

4747
@uglifier = Autoload::Uglifier.new(options)

test/test_uglifier_compressor.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ class TestUglifierCompressor < MiniTest::Test
66
def test_compress_javascript
77
input = {
88
content_type: 'application/javascript',
9-
data: "function foo() {\n return true;\n}",
9+
data: "/* Copyright Rails */\nfunction foo() {\n return true;\n}",
1010
cache: Sprockets::Cache.new
1111
}
1212
output = "function foo(){return!0}"

0 commit comments

Comments
 (0)