hof 23.0.0-frontend-v4-beta.14 → 24.0.0-vite-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +0 -14
- package/build/tasks/images/index.js +5 -20
- package/build/tasks/index.js +1 -1
- package/build/tasks/vite/index.js +40 -0
- package/build/tasks/vite/vite.config.js +53 -0
- package/build/tasks/watch/index.js +2 -9
- package/components/date/templates/date.html +1 -1
- package/components/emailer/emailer.js +3 -3
- package/config/builder-defaults.js +5 -17
- package/frontend/govuk-template/build/config.js +0 -1
- package/frontend/govuk-template/build/govuk_template.html +42 -58
- package/frontend/govuk-template/govuk_template_generated.html +42 -58
- package/frontend/template-mixins/mixins/template-mixins.js +4 -5
- package/frontend/template-mixins/partials/forms/checkbox.html +1 -5
- package/frontend/template-mixins/partials/forms/input-text-date.html +1 -2
- package/frontend/template-mixins/partials/forms/input-text-group.html +1 -1
- package/frontend/template-mixins/partials/forms/textarea-group.html +1 -1
- package/frontend/template-partials/views/layout.html +1 -1
- package/frontend/template-partials/views/partials/confirmation-alert.html +1 -3
- package/frontend/template-partials/views/partials/cookie-banner.html +32 -50
- package/frontend/template-partials/views/partials/navigation.html +2 -2
- package/frontend/themes/gov-uk/client-js/cookieSettings.js +23 -35
- package/frontend/themes/gov-uk/styles/govuk.scss +1 -1
- package/frontend/toolkit/index.js +6 -6
- package/index.js +4 -6
- package/package.json +7 -4
- package/sandbox/assets/{rebrand/js → js}/index.js +1 -1
- package/sandbox/assets/{rebrand/scss → scss}/app.scss +1 -1
- package/sandbox/package.json +2 -2
- package/sandbox/public/css/app.css +1373 -3045
- package/sandbox/yarn.lock +4 -4
- package/build/tasks/browserify/compress.js +0 -15
- package/build/tasks/browserify/index.js +0 -48
- package/frontend/toolkit/assets/rebrand/images/govuk-logo.svg +0 -25
- package/sandbox/public/images/govuk-logo.svg +0 -25
- package/sandbox/public/images/passports/new-window-link-blue.png +0 -0
- package/sandbox/public/images/passports/new-window-link.png +0 -0
- package/sandbox/public/images/spinner.gif +0 -0
- package/sandbox/public/js/bundle.js +0 -39258
- /package/frontend/toolkit/assets/{rebrand/images → images}/passports/new-window-link-blue.png +0 -0
- /package/frontend/toolkit/assets/{rebrand/images → images}/passports/new-window-link.png +0 -0
- /package/frontend/toolkit/assets/{rebrand/images → images}/spinner.gif +0 -0
- /package/frontend/toolkit/assets/{rebrand/javascript → javascript}/character-count.js +0 -0
- /package/frontend/toolkit/assets/{rebrand/javascript → javascript}/form-focus.js +0 -0
- /package/frontend/toolkit/assets/{rebrand/javascript → javascript}/helpers.js +0 -0
- /package/frontend/toolkit/assets/{rebrand/javascript → javascript}/progressive-reveal.js +0 -0
- /package/frontend/toolkit/assets/{rebrand/javascript → javascript}/validation.js +0 -0
- /package/frontend/toolkit/assets/{rebrand/javascript → javascript}/vendor/details.polyfill.js +0 -0
- /package/frontend/toolkit/assets/{rebrand/javascript → javascript}/vendor/indexof.polyfill.js +0 -0
- /package/frontend/toolkit/assets/{rebrand/javascript → javascript}/vendor/safari-cachebuster.js +0 -0
- /package/frontend/toolkit/assets/{rebrand/stylesheets → stylesheets}/_base.scss +0 -0
- /package/frontend/toolkit/assets/{rebrand/stylesheets → stylesheets}/_helpers.scss +0 -0
- /package/frontend/toolkit/assets/{rebrand/stylesheets → stylesheets}/_layout.scss +0 -0
- /package/frontend/toolkit/assets/{rebrand/stylesheets → stylesheets}/_typography.scss +0 -0
- /package/frontend/toolkit/assets/{rebrand/stylesheets → stylesheets}/_variables.scss +0 -0
- /package/frontend/toolkit/assets/{rebrand/stylesheets → stylesheets}/app.scss +0 -0
- /package/frontend/toolkit/assets/{rebrand/stylesheets → stylesheets}/govuk-elements/_buttons.scss +0 -0
- /package/frontend/toolkit/assets/{rebrand/stylesheets → stylesheets}/govuk-elements/_details.scss +0 -0
- /package/frontend/toolkit/assets/{rebrand/stylesheets → stylesheets}/govuk-elements/_elements-typography.scss +0 -0
- /package/frontend/toolkit/assets/{rebrand/stylesheets → stylesheets}/govuk-elements/_forms.scss +0 -0
- /package/frontend/toolkit/assets/{rebrand/stylesheets → stylesheets}/govuk-elements/_helpers.scss +0 -0
- /package/frontend/toolkit/assets/{rebrand/stylesheets → stylesheets}/govuk-elements/_layout.scss +0 -0
- /package/frontend/toolkit/assets/{rebrand/stylesheets → stylesheets}/govuk-elements/_lists.scss +0 -0
- /package/frontend/toolkit/assets/{rebrand/stylesheets → stylesheets}/govuk-elements/_panels.scss +0 -0
- /package/frontend/toolkit/assets/{rebrand/stylesheets → stylesheets}/govuk-elements/_reset.scss +0 -0
- /package/frontend/toolkit/assets/{rebrand/stylesheets → stylesheets}/govuk-elements/_tables.scss +0 -0
- /package/frontend/toolkit/assets/{rebrand/stylesheets → stylesheets}/govuk-elements/forms/_form-block-labels.scss +0 -0
- /package/frontend/toolkit/assets/{rebrand/stylesheets → stylesheets}/govuk-elements/forms/_form-date.scss +0 -0
- /package/frontend/toolkit/assets/{rebrand/stylesheets → stylesheets}/govuk-elements/forms/_form-validation.scss +0 -0
- /package/frontend/toolkit/assets/{rebrand/stylesheets → stylesheets}/mixins.scss +0 -0
- /package/frontend/toolkit/assets/{rebrand/stylesheets → stylesheets}/modules/_alerts.scss +0 -0
- /package/frontend/toolkit/assets/{rebrand/stylesheets → stylesheets}/modules/_buttons.scss +0 -0
- /package/frontend/toolkit/assets/{rebrand/stylesheets → stylesheets}/modules/_confirm-page.scss +0 -0
- /package/frontend/toolkit/assets/{rebrand/stylesheets → stylesheets}/modules/_lists.scss +0 -0
- /package/frontend/toolkit/assets/{rebrand/stylesheets → stylesheets}/modules/_progressive-reveal.scss +0 -0
- /package/frontend/toolkit/assets/{rebrand/stylesheets → stylesheets}/modules/_validation.scss +0 -0
- /package/sandbox/assets/{rebrand/images → images}/icons/icon-caret-left.png +0 -0
- /package/sandbox/assets/{rebrand/images → images}/icons/icon-complete.png +0 -0
- /package/sandbox/assets/{rebrand/images → images}/icons/icon-cross-remove-sign.png +0 -0
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
{{#errorlist.length}}{{#t}}errorlist.prefix{{/t}}{{/errorlist.length}}{{#title}}{{title}}{{/title}}{{^title}}{{$header}}{{/header}}{{/title}}{{#serviceName}} – {{serviceName}}{{/serviceName}} – GOV.UK
|
|
7
7
|
{{/pageTitle}}
|
|
8
8
|
{{$bodyStart}}
|
|
9
|
-
<a href="#{{#skipToMain}}{{skipToMain}}{{/skipToMain}}{{^skipToMain}}main-content{{/skipToMain}}" class="govuk-skip-link"
|
|
9
|
+
<a href="#{{#skipToMain}}{{skipToMain}}{{/skipToMain}}{{^skipToMain}}main-content{{/skipToMain}}" class="govuk-skip-link" id="skip-to-main">Skip to main content</a>
|
|
10
10
|
{{/bodyStart}}
|
|
11
11
|
{{$headerClass}}govuk-header{{/headerClass}}
|
|
12
12
|
{{$insideHeader}}{{/insideHeader}}
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
<div class="govuk-panel govuk-panel--confirmation" role="alert">
|
|
2
2
|
<h1 govuk-panel__title>{{#t}}journey.confirmation.message{{/t}}</h1>
|
|
3
|
-
<div class="govuk-panel__body">
|
|
4
|
-
{{#t}}journey.confirmation.details{{/t}}
|
|
5
|
-
</div>
|
|
3
|
+
<div class="govuk-panel__body">{{#t}}journey.confirmation.details{{/t}}</div>
|
|
6
4
|
</div>
|
|
@@ -1,51 +1,33 @@
|
|
|
1
|
-
<div id="cookie-banner" class="govuk-cookie-banner
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
Hide cookie message
|
|
34
|
-
</button>
|
|
35
|
-
</div>
|
|
36
|
-
</div>
|
|
37
|
-
<div id="cookie-banner-submitted-rejected" class="govuk-cookie-banner__message govuk-width-container" role="alert" hidden>
|
|
38
|
-
<div class="govuk-grid-row">
|
|
39
|
-
<div class="govuk-grid-column-two-thirds">
|
|
40
|
-
<div class="govuk-cookie-banner__content">
|
|
41
|
-
<p class="govuk-body">You've rejected additional cookies. You can <a class="govuk-link" href="/cookies">change your cookie settings</a> at any time.</p>
|
|
42
|
-
</div>
|
|
43
|
-
</div>
|
|
44
|
-
</div>
|
|
45
|
-
<div class="govuk-button-group">
|
|
46
|
-
<button id="hide-reject-cookie-banner" value="yes" type="submit" name="cookies[hide]" class="govuk-button" data-module="govuk-button">
|
|
47
|
-
Hide cookie message
|
|
48
|
-
</button>
|
|
49
|
-
</div>
|
|
50
|
-
</div>
|
|
1
|
+
<div id="cookie-banner" class="govuk-cookie-banner gem-c-cookie-banner govuk-clearfix">
|
|
2
|
+
<div class="gem-c-cookie-banner__message govuk-cookie-banner__message govuk-width-container">
|
|
3
|
+
<div id="cookie-banner-info" class="govuk-grid-row">
|
|
4
|
+
<div class="govuk-grid-column-two-thirds">
|
|
5
|
+
<h2 class="govuk-cookie-banner__heading govuk-heading-m">Cookies on {{#appName}}{{appName}}{{/appName}}{{^appName}}this service{{/appName}}</h2>
|
|
6
|
+
<div class="govuk-cookie-banner__content">
|
|
7
|
+
<p class="govuk-body">{{#t}}cookies.banner.message{{/t}}</p>
|
|
8
|
+
{{#hasGoogleAnalytics}}
|
|
9
|
+
<p class="govuk-body">We'd like to set additional cookies to understand how you use GOV.UK, remember your settings and improve government services.</p>
|
|
10
|
+
<p class="govuk-body">We also use cookies set by other sites to help us deliver content from their services.</p>
|
|
11
|
+
{{/hasGoogleAnalytics}}
|
|
12
|
+
</div>
|
|
13
|
+
</div>
|
|
14
|
+
</div>
|
|
15
|
+
<div id="cookie-banner-actions" class="govuk-button-group">
|
|
16
|
+
{{#hasGoogleAnalytics}}
|
|
17
|
+
<button id="accept-cookies-button" class="gem-c-button govuk-button" type="submit" data-module="gem-track-click" data-accept-cookies="true" data-track-category="cookieBanner" data-track-action="Cookie banner accepted" data-cookie-types="all">Accept additional cookies</button>
|
|
18
|
+
|
|
19
|
+
<button id="reject-cookies-button" class="gem-c-button govuk-button" type="submit" data-module="gem-track-click" data-reject-cookies="true" data-track-category="cookieBanner" data-track-action="Cookie banner rejected">Reject additional cookies</button>
|
|
20
|
+
{{/hasGoogleAnalytics}}
|
|
21
|
+
<a class="govuk-link" href="/cookies">{{#t}}cookies.banner.link{{/t}}</a>
|
|
22
|
+
</div>
|
|
23
|
+
</div>
|
|
24
|
+
|
|
25
|
+
<div class="gem-c-cookie-banner__confirmation govuk-width-container" hidden="" id="cookie-banner-submitted" >
|
|
26
|
+
<p class="gem-c-cookie-banner__confirmation-message" role="alert">
|
|
27
|
+
Your cookie preferences have been saved. You can <a class="govuk-link" data-module="gem-track-click" data-track-category="cookieBanner" data-track-action="Cookie banner settings clicked from confirmation" href="/cookies">change your cookie settings</a> at any time.
|
|
28
|
+
</p>
|
|
29
|
+
<div class="govuk-button-group">
|
|
30
|
+
<button class="gem-c-cookie-banner__hide-button govuk-button" id="hide-cookie-banner">Hide this message</button>
|
|
31
|
+
</div>
|
|
32
|
+
</div>
|
|
51
33
|
</div>
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<div class="govuk-header__content">
|
|
2
2
|
{{#startPageRedirectUrl}}
|
|
3
|
-
<a href="{{startPageRedirectUrl}}" class="govuk-header__link govuk-
|
|
3
|
+
<a href="{{startPageRedirectUrl}}" class="govuk-header__link govuk-header__link--service-name" id="proposition-name">{{$journeyHeader}}{{/journeyHeader}}</a>
|
|
4
4
|
{{/startPageRedirectUrl}}
|
|
5
5
|
{{^startPageRedirectUrl}}
|
|
6
|
-
<a href="{{journeyHeaderURL}}" class="govuk-header__link govuk-
|
|
6
|
+
<a href="{{journeyHeaderURL}}" class="govuk-header__link govuk-header__link--service-name" id="proposition-name">{{$journeyHeader}}{{/journeyHeader}}</a>
|
|
7
7
|
{{/startPageRedirectUrl}}
|
|
8
8
|
</div>
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
/* eslint-disable no-undef */
|
|
1
|
+
/* eslint-disable max-len, no-var, vars-on-top, no-undef */
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
4
|
// TODO: update package.json(s)
|
|
5
5
|
|
|
6
6
|
function hideFallbackContent(containerId) {
|
|
7
|
-
|
|
7
|
+
var container = document.getElementById(containerId);
|
|
8
8
|
if (container === null) return;
|
|
9
|
-
|
|
10
|
-
for (
|
|
9
|
+
var fallbackContent = container.getElementsByClassName('js-disabled');
|
|
10
|
+
for (var i = 0; i < fallbackContent.length; i++) {
|
|
11
11
|
fallbackContent[i].style.display = 'none';
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
function showInteractiveContent(containerId) {
|
|
16
|
-
|
|
16
|
+
var container = document.getElementById(containerId);
|
|
17
17
|
if (container === null) return;
|
|
18
|
-
|
|
19
|
-
for (
|
|
18
|
+
var interactiveContent = container.getElementsByClassName('js-enabled');
|
|
19
|
+
for (var i = 0; i < interactiveContent.length; i++) {
|
|
20
20
|
interactiveContent[i].style.display = 'block';
|
|
21
21
|
}
|
|
22
22
|
}
|
|
@@ -34,23 +34,12 @@ function setCookiePreferences(preferences) {
|
|
|
34
34
|
function showCookieBannerSubmitted() {
|
|
35
35
|
document.getElementById('cookie-banner-info').style.display = 'none';
|
|
36
36
|
document.getElementById('cookie-banner-actions').style.display = 'none';
|
|
37
|
-
|
|
38
|
-
const cookieBannerDiv = document.getElementById('cookie-banner-submitted-accepted');
|
|
39
|
-
if (cookieBannerDiv.dataset.acceptCookies === 'true') {
|
|
40
|
-
cookieBannerSubmitted = document.getElementById('cookie-banner-submitted-accepted');
|
|
41
|
-
} else {
|
|
42
|
-
cookieBannerSubmitted = document.getElementById('cookie-banner-submitted-rejected');
|
|
43
|
-
}
|
|
37
|
+
var cookieBannerSubmitted = document.getElementById('cookie-banner-submitted');
|
|
44
38
|
cookieBannerSubmitted.style.display = 'block';
|
|
45
39
|
cookieBannerSubmitted.focus();
|
|
46
40
|
}
|
|
47
41
|
|
|
48
|
-
function hideCookieBanner() {
|
|
49
|
-
document.getElementById('cookie-banner').style.display = 'none';
|
|
50
|
-
}
|
|
51
|
-
|
|
52
42
|
function initialiseBannerButtons() {
|
|
53
|
-
const acceptedCookieBannerDiv = document.getElementById('cookie-banner-submitted-accepted');
|
|
54
43
|
document.getElementById('accept-cookies-button').addEventListener('click', function () {
|
|
55
44
|
setCookiePreferences({essential: true, usage: true});
|
|
56
45
|
showCookieBannerSubmitted();
|
|
@@ -59,28 +48,27 @@ function initialiseBannerButtons() {
|
|
|
59
48
|
});
|
|
60
49
|
|
|
61
50
|
document.getElementById('reject-cookies-button').addEventListener('click', function () {
|
|
62
|
-
setCookiePreferences({
|
|
63
|
-
acceptedCookieBannerDiv.dataset.acceptCookies = 'false';
|
|
51
|
+
setCookiePreferences({essential: true, usage: false});
|
|
64
52
|
showCookieBannerSubmitted();
|
|
65
53
|
});
|
|
66
54
|
|
|
67
|
-
document.getElementById('hide-
|
|
68
|
-
|
|
69
|
-
|
|
55
|
+
document.getElementById('hide-cookie-banner').addEventListener('click', function () {
|
|
56
|
+
document.getElementById('cookie-banner').style.display = 'none';
|
|
57
|
+
});
|
|
70
58
|
}
|
|
71
59
|
|
|
72
60
|
function initialiseCookieBanner() {
|
|
73
|
-
|
|
61
|
+
var preferences = GOVUK.cookie('cookie_preferences');
|
|
74
62
|
|
|
75
63
|
if (preferences !== null) {
|
|
76
64
|
return;
|
|
77
65
|
}
|
|
78
66
|
|
|
79
67
|
// the default cookie message container from hof-govuk-template
|
|
80
|
-
|
|
68
|
+
var bannerContainer = document.getElementById('global-cookie-message');
|
|
81
69
|
|
|
82
70
|
// the cookie banner that will replace the container's default content if using google analytics
|
|
83
|
-
|
|
71
|
+
var cookieBanner = document.getElementById('cookie-banner');
|
|
84
72
|
|
|
85
73
|
if (bannerContainer !== null && cookieBanner !== null) {
|
|
86
74
|
hideFallbackContent('global-cookie-message');
|
|
@@ -94,8 +82,8 @@ function handleSaveSettings(e) {
|
|
|
94
82
|
e.preventDefault();
|
|
95
83
|
setCookiePreferences({ essential: true, usage: document.getElementById('radio-1').checked });
|
|
96
84
|
|
|
97
|
-
|
|
98
|
-
|
|
85
|
+
var cookieNotification = document.getElementById('cookie-notification');
|
|
86
|
+
var cookieBanner = document.getElementById('cookie-banner');
|
|
99
87
|
|
|
100
88
|
if (cookieBanner !== null) {
|
|
101
89
|
cookieBanner.style.display = 'none';
|
|
@@ -108,8 +96,8 @@ function handleSaveSettings(e) {
|
|
|
108
96
|
}
|
|
109
97
|
|
|
110
98
|
function initialiseFormControls() {
|
|
111
|
-
|
|
112
|
-
|
|
99
|
+
var preferences = JSON.parse(GOVUK.cookie('cookie_preferences'));
|
|
100
|
+
var usage;
|
|
113
101
|
|
|
114
102
|
if (preferences !== null && preferences.usage !== undefined && typeof preferences.usage === 'boolean') {
|
|
115
103
|
usage = preferences.usage;
|
|
@@ -123,7 +111,7 @@ function initialiseFormControls() {
|
|
|
123
111
|
}
|
|
124
112
|
|
|
125
113
|
function initialiseCookiePage() {
|
|
126
|
-
|
|
114
|
+
var shouldDisplayCookieControls = document.getElementById('cookie-settings') !== null;
|
|
127
115
|
|
|
128
116
|
if (shouldDisplayCookieControls) {
|
|
129
117
|
hideFallbackContent('cookie-settings');
|
|
@@ -134,12 +122,12 @@ function initialiseCookiePage() {
|
|
|
134
122
|
|
|
135
123
|
function onLoad() {
|
|
136
124
|
window.onload = function () {
|
|
137
|
-
|
|
125
|
+
var reloading = sessionStorage.getItem('reloading');
|
|
138
126
|
if (reloading) {
|
|
139
127
|
sessionStorage.removeItem('reloading');
|
|
140
128
|
|
|
141
|
-
|
|
142
|
-
|
|
129
|
+
var bannerContainer = document.getElementById('global-cookie-message');
|
|
130
|
+
var cookieBanner = document.getElementById('cookie-banner');
|
|
143
131
|
|
|
144
132
|
if (bannerContainer !== null && cookieBanner !== null) {
|
|
145
133
|
bannerContainer.style.display = 'block';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
module.exports = {
|
|
2
|
-
helpers: require('./assets/
|
|
3
|
-
formFocus: require('./assets/
|
|
4
|
-
progressiveReveal: require('./assets/
|
|
5
|
-
validation: require('./assets/
|
|
2
|
+
helpers: require('./assets/javascript/helpers'),
|
|
3
|
+
formFocus: require('./assets/javascript/form-focus'),
|
|
4
|
+
progressiveReveal: require('./assets/javascript/progressive-reveal'),
|
|
5
|
+
validation: require('./assets/javascript/validation'),
|
|
6
6
|
detailsSummary: function () {
|
|
7
|
-
require('./assets/
|
|
7
|
+
require('./assets/javascript/vendor/details.polyfill');
|
|
8
8
|
},
|
|
9
|
-
characterCount: require('./assets/
|
|
9
|
+
characterCount: require('./assets/javascript/character-count')
|
|
10
10
|
};
|
package/index.js
CHANGED
|
@@ -77,8 +77,7 @@ const getContentSecurityPolicy = (config, res) => {
|
|
|
77
77
|
imgSrc: ["'self'"],
|
|
78
78
|
fontSrc: ["'self'", 'data:', 'https://design-system.service.gov.uk'],
|
|
79
79
|
scriptSrc: ["'self'", `'nonce-${res.locals.nonce}'`],
|
|
80
|
-
'frame-ancestors': ["'none'"]
|
|
81
|
-
manifestSrc: ["'self'"]
|
|
80
|
+
'frame-ancestors': ["'none'"]
|
|
82
81
|
};
|
|
83
82
|
/* eslint-enable quotes */
|
|
84
83
|
|
|
@@ -96,8 +95,7 @@ const getContentSecurityPolicy = (config, res) => {
|
|
|
96
95
|
'https://www.google-analytics.com',
|
|
97
96
|
'https://region1.google-analytics.com',
|
|
98
97
|
'https://region1.analytics.google.com'
|
|
99
|
-
]
|
|
100
|
-
manifestSrc: ["'self'"]
|
|
98
|
+
]
|
|
101
99
|
};
|
|
102
100
|
|
|
103
101
|
if (config.gaTagId) {
|
|
@@ -238,8 +236,8 @@ function bootstrap(options) {
|
|
|
238
236
|
app.use(hofMiddleware.rateLimiter(config, 'requests'));
|
|
239
237
|
}
|
|
240
238
|
|
|
241
|
-
// Set up routing so <YOUR-SITE-URL>/assets are served from /node_modules/govuk-frontend/govuk/assets
|
|
242
|
-
app.use('/assets', express.static(path.join(__dirname, '/node_modules/govuk-frontend/govuk/assets
|
|
239
|
+
// Set up routing so <YOUR-SITE-URL>/assets are served from /node_modules/govuk-frontend/govuk/assets
|
|
240
|
+
app.use('/assets', express.static(path.join(__dirname, '/node_modules/govuk-frontend/govuk/assets')));
|
|
243
241
|
// Check if service has been paused and redirect accordingly
|
|
244
242
|
const bypassPaths = ['/assets', '/healthcheck', '/service-unavailable'];
|
|
245
243
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hof",
|
|
3
3
|
"description": "A bootstrap for HOF projects",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "24.0.0-vite-beta.2",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "index.js",
|
|
7
7
|
"author": "HomeOffice",
|
|
@@ -32,14 +32,16 @@
|
|
|
32
32
|
"test:acceptance_browser": "ACCEPTANCE_WITH_BROWSER=true TAGS=\"${TAGS:=@feature}\" yarn run test:cucumber",
|
|
33
33
|
"test:cucumber": "cucumber-js -f @cucumber/pretty-formatter \"sandbox/test/_features/**/*.feature\" --require sandbox/test/_features/test.setup.js --require \"sandbox/test/_features/step_definitions/**/*.js\" --tags $TAGS",
|
|
34
34
|
"ci": "travis-conditions",
|
|
35
|
-
"postversion": "git push && git push --tags"
|
|
35
|
+
"postversion": "git push && git push --tags",
|
|
36
|
+
"dev": "vite",
|
|
37
|
+
"build": "vite build",
|
|
38
|
+
"preview": "vite preview"
|
|
36
39
|
},
|
|
37
40
|
"dependencies": {
|
|
38
41
|
"aliasify": "^2.1.0",
|
|
39
42
|
"axios": "^1.12.2",
|
|
40
43
|
"bluebird": "^3.7.2",
|
|
41
44
|
"body-parser": "^1.20.3",
|
|
42
|
-
"browserify": "^17.0.1",
|
|
43
45
|
"callsite": "^1.0.0",
|
|
44
46
|
"chalk": "^2.4.2",
|
|
45
47
|
"chokidar": "^3.6.0",
|
|
@@ -60,7 +62,7 @@
|
|
|
60
62
|
"findup": "^0.1.5",
|
|
61
63
|
"glob": "^7.2.3",
|
|
62
64
|
"govuk-elements-sass": "^3.1.3",
|
|
63
|
-
"govuk-frontend": "
|
|
65
|
+
"govuk-frontend": "3.15.0",
|
|
64
66
|
"govuk_template_mustache": "^0.26.0",
|
|
65
67
|
"helmet": "^3.23.3",
|
|
66
68
|
"hogan-express-strict": "^0.5.4",
|
|
@@ -92,6 +94,7 @@
|
|
|
92
94
|
"underscore": "^1.13.7",
|
|
93
95
|
"urijs": "^1.19.11",
|
|
94
96
|
"uuid": "^8.3.2",
|
|
97
|
+
"vite": "^7.1.12",
|
|
95
98
|
"winston": "^3.18.3"
|
|
96
99
|
},
|
|
97
100
|
"devDependencies": {
|
package/sandbox/package.json
CHANGED
|
@@ -8,14 +8,14 @@
|
|
|
8
8
|
},
|
|
9
9
|
"scripts": {
|
|
10
10
|
"start": "node server.js",
|
|
11
|
-
"start:dev": "HOF_SANDBOX=true ../bin/hof-build watch
|
|
11
|
+
"start:dev": "HOF_SANDBOX=true ../bin/hof-build watch",
|
|
12
12
|
"dev": "yarn && GA_TAG=test nodemon server",
|
|
13
13
|
"build": "HOF_SANDBOX=true ../bin/hof-build",
|
|
14
14
|
"postinstall": "yarn run build"
|
|
15
15
|
},
|
|
16
16
|
"author": "",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"govuk-frontend": "
|
|
18
|
+
"govuk-frontend": "3.14",
|
|
19
19
|
"jquery": "^3.7.1",
|
|
20
20
|
"sass": "^1.53.0",
|
|
21
21
|
"typeahead-aria": "^1.0.4"
|