Skip to content

Commit

Permalink
Updates Ugglifier. (#380)
Browse files Browse the repository at this point in the history
Co-authored-by: Thomas Scherz <[email protected]>
  • Loading branch information
scherztc and Thomas Scherz authored Dec 2, 2024
1 parent 680e596 commit a03bdea
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ gem 'sass-rails', '~> 5.0'
# Use Devise for authentication
gem 'devise'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
gem 'uglifier', '~> 4.2', '>= 4.2.1'
# See https://github.com/rails/execjs#readme for more supported runtimes
# gem 'mini_racer', platforms: :ruby
# Use CoffeeScript for .coffee assets and views
Expand Down
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@ DEPENDENCIES
sqlite3 (~> 1.4)
turbolinks (~> 5)
tzinfo-data
uglifier (>= 1.3.0)
uglifier (~> 4.2, >= 4.2.1)
web-console (>= 3.3.0)

RUBY VERSION
Expand Down
2 changes: 1 addition & 1 deletion app/assets/javascripts/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
//
//= require rails-ujs
//= require jquery3
//= require bootstrap-sprockets
//= require bootstrap
//= require gritter
//= require activestorage
//= require turbolinks
Expand Down
4 changes: 2 additions & 2 deletions app/views/front/dashboard.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
</div>
<div class="card-body" style="overflow: scroll; height: 10%; background-color: black ; color: white">
<% if @indesign_count != 0 %>
<table class="table text-center w-25" style="padding-left: 20p; background-color: black">
<table class="table text-center w-25" style="padding-left: 20px; background-color: black">
<thead>
<tr>
<th class="align-left" style="padding-left: 20px; background-color: black ; color: white"><%= sortable "title", "Software Record" %>
Expand All @@ -28,7 +28,7 @@
<i class="fa fa-caret-down float-none"></i>
<% end %></th>
<th class="align-left" style="padding-left: 20px; background-color: black ; color: white">Status</th>
<th class="align-left" style="padding-left: 20px; background-color: black ; color: white""><%= sortable "production_url", "URL" %>
<th class="align-left" style="padding-left: 20px; background-color: black ; color: white"><%= sortable "production_url", "URL" %>
<% if params[:direction] == "asc" || params[:direction] == nil %>
<i class="fa fa-caret-up"></i>
<% else %>
Expand Down
2 changes: 1 addition & 1 deletion config/deploy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
WARN
ask :value, "Sure you want to continue deploying `#{branch}` on #{stage}? (Y)"

if fetch(:value) != 'Y'
if fetch(:value).to_s.downcase != 'y'
puts "\nDeploy cancelled!"
exit
end
Expand Down
10 changes: 9 additions & 1 deletion config/environments/production.rb
Original file line number Diff line number Diff line change
Expand Up @@ -112,5 +112,13 @@
config.active_record.dump_schema_after_migration = false

# Change the Uglifier parsing engine
config.assets.js_compressor = Uglifier.new(harmony: true)
config.assets.js_compressor = Uglifier.new(
harmony: true,
mangle: false,
compress: false,
output: {
beautify: true,
comments: :all
}
)
end

0 comments on commit a03bdea

Please sign in to comment.