1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2025-01-18 07:52:23 +01:00

updated uglifier with es6 support

This commit is contained in:
Sylvain 2018-12-03 10:22:10 +01:00
parent 177e087abf
commit 56a62e975c
6 changed files with 16 additions and 15 deletions

View File

@ -4,3 +4,5 @@ Metrics/MethodLength:
Max: 16
Style/BracesAroundHashParameters:
EnforcedStyle: context_dependent
Style/RegexpLiteral:
EnforcedStyle: slashes

View File

@ -2,6 +2,7 @@
- Fix rake task fablab:es_build_projects_index for ElasticSearch > 1.7
- Fix Dockerfile: yarn was not setup correctly
- Updated Uglifier gem to support ES6 syntax
# v2.7.2 2018 November 29

View File

@ -7,7 +7,7 @@ gem 'rails', '4.2.10'
gem 'sass-rails', '5.0.1'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
gem 'uglifier', '>= 4.1.20'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
gem 'therubyracer', '= 0.12.0', platforms: :ruby

View File

@ -460,9 +460,8 @@ GEM
tzinfo
tzinfo (1.2.4)
thread_safe (~> 0.1)
uglifier (2.7.1)
execjs (>= 0.3.0)
json (>= 1.8.0)
uglifier (4.1.20)
execjs (>= 0.3.0, < 3)
unf (0.1.4)
unf_ext
unf_ext (0.0.6)
@ -564,7 +563,7 @@ DEPENDENCIES
therubyracer (= 0.12.0)
twitter
twitter-text
uglifier (>= 1.3.0)
uglifier (>= 4.1.20)
unicorn
vcr
web-console (~> 2.1.3)

View File

@ -22,10 +22,8 @@ Rails.application.configure do
# Disable Rails's static asset server (Apache or nginx will already do this).
config.serve_static_files = false
# Compress JavaScripts and CSS.
config.assets.js_compressor = :uglifier
# if you want disable variable name mangling
config.assets.js_compressor = Uglifier.new(mangle: false)
# Compress JavaScripts and CSS. We disable variable name mangling and enable ES6 support
config.assets.js_compressor = Uglifier.new(mangle: false, harmony: true)
# config.assets.css_compressor = :sass

View File

@ -113,7 +113,7 @@ Rails.application.routes.draw do
resources :event_themes
resources :age_ranges
resources :statistics, only: [:index]
resources :custom_assets, only: [:show, :create, :update]
resources :custom_assets, only: %i[show create update]
resources :tags
resources :stylesheets, only: [:show]
resources :auth_providers do
@ -122,14 +122,15 @@ Rails.application.routes.draw do
post 'send_code', action: 'send_code', on: :collection
end
resources :abuses, only: [:create]
resources :open_api_clients, only: [:index, :create, :update, :destroy] do
resources :open_api_clients, only: %i[index create update destroy] do
patch :reset_token, on: :member
end
resources :price_categories
resources :spaces
# i18n
get 'translations/:locale/:state' => 'translations#show', :constraints => { :state => /[^\/]+/ } # allow dots in URL for 'state'
# regex allows using dots in URL for 'state'
get 'translations/:locale/:state' => 'translations#show', :constraints => { state: /[^\/]+/ }
# XLSX exports
get 'exports/:id/download' => 'exports#download'
@ -166,12 +167,12 @@ Rails.application.routes.draw do
end
end
%w(account event machine project subscription training user space).each do |path|
%w[account event machine project subscription training user space].each do |path|
post "/stats/#{path}/_search", to: "api/statistics##{path}"
post "/stats/#{path}/export", to: "api/statistics#export_#{path}"
end
post '/stats/global/export', to: "api/statistics#export_global"
post '_search/scroll', to: "api/statistics#scroll"
post '/stats/global/export', to: 'api/statistics#export_global'
post '_search/scroll', to: 'api/statistics#scroll'
match '/project_collaborator/:valid_token', to: 'api/projects#collaborator_valid', via: :get