From 00fbcac0e9d17235074155da6466aa6c550a79ea Mon Sep 17 00:00:00 2001 From: Patrick Cartlidge Date: Thu, 16 Nov 2023 13:38:31 +0000 Subject: [PATCH] move to sep file --- app/assets/config/manifest.js | 1 + app/assets/javascripts/application.js | 3 --- app/assets/javascripts/es6-components.js | 3 +++ app/views/layouts/application.html.erb | 1 + startup.sh | 2 +- 5 files changed, 6 insertions(+), 4 deletions(-) create mode 100644 app/assets/javascripts/es6-components.js diff --git a/app/assets/config/manifest.js b/app/assets/config/manifest.js index 3fd49beb7e..d40b897b50 100644 --- a/app/assets/config/manifest.js +++ b/app/assets/config/manifest.js @@ -1,5 +1,6 @@ //= link_tree ../images //= link application.js +//= link es6-components.js //= link webchat.js //= link application.css //= link components/_back-to-top.css diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js index fdd109291b..3110fcc696 100644 --- a/app/assets/javascripts/application.js +++ b/app/assets/javascripts/application.js @@ -1,13 +1,10 @@ //= require govuk_publishing_components/lib -//= require govuk_publishing_components/components/accordion //= require govuk_publishing_components/components/details -//= require govuk_publishing_components/components/error-summary //= require govuk_publishing_components/components/govspeak //= require govuk_publishing_components/components/image-card //= require govuk_publishing_components/components/intervention //= require govuk_publishing_components/components/metadata //= require govuk_publishing_components/components/print-link -//= require govuk_publishing_components/components/radio //= require govuk_publishing_components/components/single-page-notification-button //= require govuk_publishing_components/components/step-by-step-nav diff --git a/app/assets/javascripts/es6-components.js b/app/assets/javascripts/es6-components.js new file mode 100644 index 0000000000..2eea020719 --- /dev/null +++ b/app/assets/javascripts/es6-components.js @@ -0,0 +1,3 @@ +//= require govuk_publishing_components/components/accordion +//= require govuk_publishing_components/components/error-summary +//= require govuk_publishing_components/components/radio diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 47668d1c82..83306d99e0 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -53,6 +53,7 @@ <% end %> <%= stylesheet_link_tag "application", :media => "all", integrity: false %> + <%= javascript_include_tag 'es6-components', type: "module" %> <%= javascript_include_tag "application", integrity: false %> <%= csrf_meta_tags %> <%= render 'govuk_publishing_components/components/meta_tags', content_item: @content_item.content_item %> diff --git a/startup.sh b/startup.sh index 621fb8514d..02241b321b 100755 --- a/startup.sh +++ b/startup.sh @@ -12,7 +12,7 @@ function set_env() { if [[ $1 == "--live" ]] ; then set_env "gov.uk" export GOVUK_PROXY_STATIC_ENABLED=true - export PLEK_SERVICE_STATIC_URI=${PLEK_SERVICE_STATIC_URI-https://assets.publishing.service.gov.uk} + export PLEK_SERVICE_STATIC_URI=${PLEK_SERVICE_STATIC_URI-http://static.dev.gov.uk} else echo "ERROR: other startup modes are not supported" echo ""