parent
07a49de7e1
commit
20a3abd864
5 changed files with 7 additions and 6 deletions
|
|
@ -5,6 +5,7 @@
|
||||||
* Fix html-syntax in some handlebars templates [#8251](https://github.com/diaspora/diaspora/pull/8251)
|
* Fix html-syntax in some handlebars templates [#8251](https://github.com/diaspora/diaspora/pull/8251)
|
||||||
* Remove `chat_enabled` flag from archive export [#8265](https://github.com/diaspora/diaspora/pull/8265)
|
* Remove `chat_enabled` flag from archive export [#8265](https://github.com/diaspora/diaspora/pull/8265)
|
||||||
* Change thumbnails in image slideshow to squares [#8275](https://github.com/diaspora/diaspora/pull/8275)
|
* Change thumbnails in image slideshow to squares [#8275](https://github.com/diaspora/diaspora/pull/8275)
|
||||||
|
* Replace uglifier with terser for JS compression [#8268](https://github.com/diaspora/diaspora/pull/8268)
|
||||||
|
|
||||||
## Bug fixes
|
## Bug fixes
|
||||||
|
|
||||||
|
|
|
||||||
2
Gemfile
2
Gemfile
|
|
@ -46,7 +46,7 @@ gem "sidekiq-cron", "1.2.0"
|
||||||
|
|
||||||
# Compression
|
# Compression
|
||||||
|
|
||||||
gem "uglifier", "4.2.0"
|
gem "terser", "1.1.5"
|
||||||
|
|
||||||
# Configuration
|
# Configuration
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -724,6 +724,8 @@ GEM
|
||||||
temple (0.8.2)
|
temple (0.8.2)
|
||||||
terminal-table (1.8.0)
|
terminal-table (1.8.0)
|
||||||
unicode-display_width (~> 1.1, >= 1.1.1)
|
unicode-display_width (~> 1.1, >= 1.1.1)
|
||||||
|
terser (1.1.5)
|
||||||
|
execjs (>= 0.3.0, < 3)
|
||||||
thor (1.1.0)
|
thor (1.1.0)
|
||||||
thread_safe (0.3.6)
|
thread_safe (0.3.6)
|
||||||
tilt (2.0.10)
|
tilt (2.0.10)
|
||||||
|
|
@ -749,8 +751,6 @@ GEM
|
||||||
ethon (>= 0.9.0)
|
ethon (>= 0.9.0)
|
||||||
tzinfo (1.2.9)
|
tzinfo (1.2.9)
|
||||||
thread_safe (~> 0.1)
|
thread_safe (~> 0.1)
|
||||||
uglifier (4.2.0)
|
|
||||||
execjs (>= 0.3.0, < 3)
|
|
||||||
unf (0.1.4)
|
unf (0.1.4)
|
||||||
unf_ext
|
unf_ext
|
||||||
unf_ext (0.0.7.7)
|
unf_ext (0.0.7.7)
|
||||||
|
|
@ -918,13 +918,13 @@ DEPENDENCIES
|
||||||
sinon-rails (= 1.15.0)
|
sinon-rails (= 1.15.0)
|
||||||
sprockets-rails (= 3.2.2)
|
sprockets-rails (= 3.2.2)
|
||||||
string-direction (= 1.2.2)
|
string-direction (= 1.2.2)
|
||||||
|
terser (= 1.1.5)
|
||||||
timecop (= 0.9.4)
|
timecop (= 0.9.4)
|
||||||
toml-rb (= 2.0.1)
|
toml-rb (= 2.0.1)
|
||||||
turbo_dev_assets (= 0.0.2)
|
turbo_dev_assets (= 0.0.2)
|
||||||
twitter (= 7.0.0)
|
twitter (= 7.0.0)
|
||||||
twitter-text (= 1.14.7)
|
twitter-text (= 1.14.7)
|
||||||
typhoeus (= 1.4.0)
|
typhoeus (= 1.4.0)
|
||||||
uglifier (= 4.2.0)
|
|
||||||
unicorn (= 6.0.0)
|
unicorn (= 6.0.0)
|
||||||
unicorn-worker-killer (= 0.4.5)
|
unicorn-worker-killer (= 0.4.5)
|
||||||
uuid (= 2.3.9)
|
uuid (= 2.3.9)
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ Rails.application.configure do
|
||||||
config.public_file_server.enabled = ENV["RAILS_SERVE_STATIC_FILES"].present?
|
config.public_file_server.enabled = ENV["RAILS_SERVE_STATIC_FILES"].present?
|
||||||
|
|
||||||
# Compress JavaScripts and CSS.
|
# Compress JavaScripts and CSS.
|
||||||
config.assets.js_compressor = :uglifier
|
config.assets.js_compressor = :terser
|
||||||
# config.assets.css_compressor = :sass
|
# config.assets.css_compressor = :sass
|
||||||
|
|
||||||
# Do not fallback to assets pipeline if a precompiled asset is missed.
|
# Do not fallback to assets pipeline if a precompiled asset is missed.
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ class BookmarkletRenderer
|
||||||
|
|
||||||
def compile
|
def compile
|
||||||
src = File.read(source)
|
src = File.read(source)
|
||||||
@body = Uglifier.compile(src)
|
@body = Terser.compile(src)
|
||||||
FileUtils.mkdir_p cached_path.dirname
|
FileUtils.mkdir_p cached_path.dirname
|
||||||
File.open(cached_path, "w") {|f| f.write(@body) }
|
File.open(cached_path, "w") {|f| f.write(@body) }
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue