From abef25dd19964622461d10ae718a3c60c163c70d Mon Sep 17 00:00:00 2001 From: Artur Beljajev Date: Fri, 8 Jun 2018 02:16:25 +0300 Subject: [PATCH] Add "uglifier" gem for es6 compression --- Gemfile | 1 + Gemfile.lock | 3 +++ config/environments/production.rb | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Gemfile b/Gemfile index 0af80fddf..6a5b53522 100644 --- a/Gemfile +++ b/Gemfile @@ -13,6 +13,7 @@ gem 'SyslogLogger', '2.0', require: 'syslog/logger' gem 'iso8601', '0.8.6' # for dates and times gem 'rails', '4.2.10' # when update, all initializers eis_custom files needs check/update gem 'rest-client' +gem 'uglifier' # load env gem 'figaro', '1.1.1' diff --git a/Gemfile.lock b/Gemfile.lock index b12b28a2d..b819c245b 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -439,6 +439,8 @@ GEM tilt (1.4.1) tzinfo (1.2.5) thread_safe (~> 0.1) + uglifier (4.1.11) + execjs (>= 0.3.0, < 3) unf (0.1.4) unf_ext unf_ext (0.0.7.2) @@ -536,6 +538,7 @@ DEPENDENCIES simpleidn (= 0.0.7) spring spring-commands-rspec + uglifier uuidtools (= 2.1.5) validates_email_format_of (= 1.6.3) webmock diff --git a/config/environments/production.rb b/config/environments/production.rb index 7d77b7220..b0c13f491 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -23,7 +23,7 @@ Rails.application.configure do config.serve_static_files = false # Compress JavaScripts and CSS. - # config.assets.js_compressor = :uglifier + config.assets.js_compressor = Uglifier.new(harmony: true) # config.assets.css_compressor = :sass # Do not fallback to assets pipeline if a precompiled asset is missed.