Skip to content

Commit

Permalink
Use terser for Javascript minification
Browse files Browse the repository at this point in the history
This is needed because of the need to create two different JS rollups and
because the default compressor fails. See link below.

#352 (comment)
  • Loading branch information
marcotranchino committed Sep 17, 2024
1 parent f5e863c commit 7769965
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@ source "https://rubygems.org"

# Specify your gem's dependencies in govuk_tech_docs.gemspec
gemspec

gem "terser"
2 changes: 2 additions & 0 deletions example/Gemfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
source "https://rubygems.org"

gem "govuk_tech_docs", path: ".."

gem "terser"
1 change: 1 addition & 0 deletions lib/govuk_tech_docs.rb
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ def self.configure(context, options = {})

context.configure :build do
activate :autoprefixer
activate :minify_javascript, compressor: Terser.new
# activate :minify_javascript, ignore: ["/raw_assets/*"]
end

Expand Down

0 comments on commit 7769965

Please sign in to comment.