History

Replace uglifier with terser

> UglifyJS only works with ES5. If you need to compress ES6, ruby-terser is a better option. https://github.com/ahorek/terser-ruby

Simon Legner committed 2 years ago

Commit 66d682e1 parent a06462f3 files · +5 −5Browse files

Unified · Split

3 files
  1. Gemfile +1 −1
  2. Gemfile.lock +3 −3
  3. lib/app.rb +1 −1
Gemfile+1−1
@@ -31,7 +31,7 @@ end · 30 unmodified lines
31 31
32group :production do32group :production do
33 gem 'newrelic_rpm'33 gem 'newrelic_rpm'
34 gem 'uglifier'34 gem "terser"
35end35end
36 36
37group :development do37group :development do
Gemfile.lock+3−3
@@ -113,6 +113,8 @@ GEM · 112 unmodified lines
113 strings-ansi (0.2.0)113 strings-ansi (0.2.0)
114 terminal-table (3.0.2)114 terminal-table (3.0.2)
115 unicode-display_width (>= 1.1.1, < 3)115 unicode-display_width (>= 1.1.1, < 3)
116 terser (1.1.20)
117 execjs (>= 0.3.0, < 3)
116 thin (1.8.2)118 thin (1.8.2)
117 daemons (~> 1.0, >= 1.0.9)119 daemons (~> 1.0, >= 1.0.9)
118 eventmachine (~> 1.0, >= 1.0.4)120 eventmachine (~> 1.0, >= 1.0.4)
@@ -127,8 +129,6 @@ GEM · 8 unmodified lines
127 ethon (>= 0.9.0)129 ethon (>= 0.9.0)
128 tzinfo (2.0.6)130 tzinfo (2.0.6)
129 concurrent-ruby (~> 1.0)131 concurrent-ruby (~> 1.0)
130 uglifier (4.2.0)
131 execjs (>= 0.3.0, < 3)
132 unicode-display_width (2.3.0)132 unicode-display_width (2.3.0)
133 unicode_utils (1.4.0)133 unicode_utils (1.4.0)
134 unix_utils (0.0.15)134 unix_utils (0.0.15)
@@ -166,11 +166,11 @@ DEPENDENCIES · 31 unmodified lines
166 sprockets-helpers166 sprockets-helpers
167 sprockets-sass167 sprockets-sass
168 terminal-table168 terminal-table
169 terser
169 thin170 thin
170 thor171 thor
171 tty-pager172 tty-pager
172 typhoeus173 typhoeus
173 uglifier
174 unix_utils174 unix_utils
175 yajl-ruby175 yajl-ruby
176 176
lib/app.rb+1−1
@@ -94,7 +94,7 @@ class App < Sinatra::Application · 93 unmodified lines
94 ['/manifest.json', { 'Cache-Control' => 'public, max-age=86400' }]94 ['/manifest.json', { 'Cache-Control' => 'public, max-age=86400' }]
95 ]95 ]
96 96
97 sprockets.js_compressor = Uglifier.new output: { :harmony => true, beautify: true, indent_level: 0 }97 sprockets.js_compressor = :terser
98 sprockets.css_compressor = :sass98 sprockets.css_compressor = :sass
99 99
100 Sprockets::Helpers.configure do |config|100 Sprockets::Helpers.configure do |config|