uglifier 4.1.0 → 4.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 81821f2dbd9fe6d03d9e01d321d1a073d3db5891
4
- data.tar.gz: 1be221b0033605bf421e57f108d9150694b3152f
2
+ SHA256:
3
+ metadata.gz: dc044eea517b7b84d21ca5004ce75abb6270fa969cf12dfc67355a224998a760
4
+ data.tar.gz: ef31af6a5dfefa266d5a9222021639901054f7e5c80816ad6ff114b226edb780
5
5
  SHA512:
6
- metadata.gz: 75e3b0c8bd64193e4317b00c4478e92a69e7fe29dca1be6b1e578dcaef4f054a0fc9606da94d2e4f5cf4a1f9c12f8eb4521584bf2e4fd6e48b4627d8c782f220
7
- data.tar.gz: 56e8ed3cb7573c02a25fd7db6c5a1404667abe3a0e87452faf49def53de5f6e7fdd30d29ab5843e3b6f796ea43f01018c7a2acd2d4b7f7399b4be53d8fc721ca
6
+ metadata.gz: 582c05aa0420c15e279d07f97d325b3c906964cfd8f8f002d1411620bce7e72a7f1359ed66621f99de2d2a6f8193d1f76e6de527796fe8edc014a38e19cf4977
7
+ data.tar.gz: 27e035538c9e6030e7137a3fae324cccb0ffeb34b08d2fdd94a96cd15414e56f471b4c7c4d0c822942ebe772b4b23f371e97c0970adb3ecd0a4358d4958fc763
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 4.1.1 (29 December 2017)
2
+
3
+ - update UglifyJS to 3.3.3
4
+
1
5
  ## 4.1.0 (28 December 2017)
2
6
 
3
7
  - update UglifyJS to 3.3.2
data/README.md CHANGED
@@ -3,16 +3,44 @@
3
3
  Ruby wrapper for [UglifyJS](https://github.com/mishoo/UglifyJS2) JavaScript
4
4
  compressor.
5
5
 
6
- UglifyJS currently is known to work quite well with ES5. Experimental
7
- ES6/Harmony support can be enabled with `:harmony => true` option.
8
- See [UglifyJS2#448](https://github.com/mishoo/UglifyJS2/issues/448) for more
9
- details.
6
+ UglifyJS currently is extensively tested with ES5, but also includes experimental ES6/ES2015+/Harmony support.
10
7
 
11
- Transpiling to ES5 (with e.g. [babel-transpiler](https://github.com/babel/ruby-babel-transpiler)) is
12
- recommended. For directly minifying ES6 code, [Closure Compiler](https://github.com/documentcloud/closure-compiler) is a more suitable option.
8
+ More stable alternatives for working with ES6 code is to first transpile to ES5 with e.g. [babel-transpiler](https://github.com/babel/ruby-babel-transpiler) or using [Closure Compiler](https://github.com/documentcloud/closure-compiler) to directly minify ES6 code.
13
9
 
14
10
  [![Build Status](https://travis-ci.org/lautis/uglifier.svg?branch=master)](https://travis-ci.org/lautis/uglifier)
15
11
 
12
+ ## ES6 / ES2015+ / Harmony mode
13
+
14
+ When using Uglifier with ES6 syntax without any options, an error will be
15
+ thrown.
16
+
17
+ ```
18
+ Uglifier::Error: Unexpected token: punc ((). To use ES6 syntax, harmony mode must be enabled with Uglifier.new(:harmony => true).
19
+ ```
20
+
21
+ The experimental ES6 syntax support can be enabled by passing `:harmony => true`
22
+ option to Uglifier.
23
+
24
+ ```ruby
25
+ Uglifier.compile(js, harmony: true)
26
+ ```
27
+
28
+ ### Rails
29
+
30
+ When used in Rails, replace
31
+
32
+ ```ruby
33
+ config.assets.js_compressor = :uglifier
34
+ ```
35
+
36
+ with
37
+
38
+ ```ruby
39
+ config.assets.js_compressor = Uglifier.new(harmony: true)
40
+ ```
41
+
42
+ in `config/environments/production.rb`.
43
+
16
44
  ## Installation
17
45
 
18
46
  Uglifier is available as a ruby gem.
@@ -1,4 +1,4 @@
1
1
  class Uglifier
2
2
  # Current version of Uglifier.
3
- VERSION = "4.1.0"
3
+ VERSION = "4.1.1"
4
4
  end