Skip to content

Commit

Permalink
Merge pull request #1647 from alphagov/publishing-components-upgrade
Browse files Browse the repository at this point in the history
Publishing components upgrade
  • Loading branch information
mike21573 authored Jul 22, 2024
2 parents 60bc6ea + c154b45 commit 5987ee2
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ gem "whenever"
gem "sass"
gem "sass-rails"
gem "sprockets"
gem "uglifier"
gem "terser"

group :development do
gem "web-console"
Expand Down
8 changes: 4 additions & 4 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ GEM
govuk_personalisation (0.16.0)
plek (>= 1.9.0)
rails (>= 6, < 8)
govuk_publishing_components (39.2.4)
govuk_publishing_components (40.0.0)
govuk_app_config
govuk_personalisation (>= 0.7.0)
kramdown
Expand Down Expand Up @@ -807,6 +807,8 @@ GEM
strscan (3.1.0)
sys-uname (1.2.3)
ffi (~> 1.1)
terser (1.2.3)
execjs (>= 0.3.0, < 3)
thor (1.3.1)
tilt (2.3.0)
timecop (0.9.10)
Expand All @@ -815,8 +817,6 @@ GEM
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
uber (0.1.0)
uglifier (4.2.0)
execjs (>= 0.3.0, < 3)
unicode-display_width (2.5.0)
uri (0.13.0)
version_gem (1.1.4)
Expand Down Expand Up @@ -890,8 +890,8 @@ DEPENDENCIES
shoulda-matchers
simplecov
sprockets
terser
timecop
uglifier
web-console
webmock
whenever
Expand Down
1 change: 1 addition & 0 deletions app/assets/config/manifest.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
//= link application.css
//= link legacy_layout.css
//= link application.js
//= link es6-components.js
//= link legacy_layout.js
//= link html5.js
3 changes: 1 addition & 2 deletions app/assets/javascripts/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,4 @@
// WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD
// GO AFTER THE REQUIRES BELOW.
//
//= require govuk_publishing_components/dependencies
//= require govuk_publishing_components/all_components
//= require govuk_publishing_components/dependencies
15 changes: 15 additions & 0 deletions app/assets/javascripts/es6-components.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// These modules from govuk_publishing_components
// depend on govuk-frontend modules. govuk-frontend
// now targets browsers that support `type="module"`.
//
// To gracefully prevent execution of these scripts
// on browsers that don't support ES6, this script
// should be included in a `type="module"` script tag
// which will ensure they are never loaded.

//= require govuk_publishing_components/components/button
//= require govuk_publishing_components/components/checkboxes
//= require govuk_publishing_components/components/error-summary
//= require govuk_publishing_components/components/layout-header
//= require govuk_publishing_components/components/radio
//= require govuk_publishing_components/components/skip-link
1 change: 1 addition & 0 deletions app/views/layouts/application.html.erb
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<% content_for :head do %>
<%= stylesheet_link_tag "legacy_layout", :media => "all" %>
<%= javascript_include_tag "legacy_layout" %>
<%= javascript_include_tag "es6-components", type: "module" %>
<%= csrf_meta_tag %>
<%= render "layouts/google_tag_manager" %>
<%= yield :extra_headers %>
Expand Down

0 comments on commit 5987ee2

Please sign in to comment.