Skip to content

Commit

Permalink
feat: Upgrade govuk package to 5.2.0 (#455)
Browse files Browse the repository at this point in the history
Fixed breaking changes from v5
  • Loading branch information
mattb-hippo authored Mar 19, 2024
1 parent 54e3854 commit 5bfe892
Show file tree
Hide file tree
Showing 27 changed files with 1,691 additions and 1,814 deletions.
5 changes: 5 additions & 0 deletions Childrens-Social-Care-CPD/Childrens-Social-Care-CPD.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@
<Folder Include="Properties\" />
<Folder Include="wwwroot\assets\images\moj\" />
</ItemGroup>
<ItemGroup>
<Content Remove="wwwroot\javascript\govuk-frontend.min.js" />
<Content Remove="wwwroot\javascript\govuk-frontend.min.js.map" />
<Content Remove="wwwroot\assets\images\govuk-opengraph-image.png" />
</ItemGroup>
<ItemGroup>
<Content Update="Views\Shared\_Footer.cshtml">
<ExcludeFromSingleFile>true</ExcludeFromSingleFile>
Expand Down
3 changes: 2 additions & 1 deletion Childrens-Social-Care-CPD/Properties/launchSettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
"Childrens_Social_Care_CPD": {
"commandName": "Project",
"launchBrowser": true,
"applicationUrl": "https://localhost:7112;http://localhost:5112",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"applicationUrl": "https://localhost:7112;http://localhost:5112",
"dotnetRunMessages": true
},
"IIS Express": {
Expand All @@ -28,6 +28,7 @@
"commandName": "Docker",
"launchBrowser": true,
"launchUrl": "{Scheme}://{ServiceHost}:{ServicePort}",
"environmentVariables": {},
"publishAllPorts": true,
"useSSL": true
}
Expand Down
11 changes: 6 additions & 5 deletions Childrens-Social-Care-CPD/Views/Shared/_SiteLayout.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
@await RenderSectionAsync("Head", required: false)
@Html.RenderScripts(ScriptPosition.HeadEnd)

<link rel="shortcut icon" sizes="16x16 32x32 48x48" href="~/assets/images/favicon.ico" type="image/x-icon">
<link rel="shortcut icon" href="~/assets/images/favicon.ico" type="image/x-icon">

</head>
<body class="govuk-template__body">
Expand All @@ -32,13 +32,14 @@
<partial name="_Footer" />
<script src="~/lib/jquery/dist/jquery.min.js"></script>
<script>
document.body.className = ((document.body.className) ? document.body.className + ' js-enabled' : 'js-enabled');
document.body.className += ' js-enabled' + ('noModule' in HTMLScriptElement.prototype ? ' govuk-frontend-supported' : '');
</script>
<!-- component HTML -->
<script src="/javascript/govuk-frontend-4.7.0.min.js"></script>
<script src="/javascript/govuk-frontend.min.js" type="module"></script>
<script src="/javascript/dfefrontend-1.0.1.min.js"></script>
<script>
window.GOVUKFrontend.initAll()
<script type="module">
import { initAll } from '/javascript/govuk-frontend.min.js'
initAll()
</script>
@await RenderSectionAsync("Scripts", required: false)
@Html.RenderScripts(ScriptPosition.BodyEnd)
Expand Down
24 changes: 20 additions & 4 deletions Childrens-Social-Care-CPD/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Childrens-Social-Care-CPD/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"dependencies": {
"@ministryofjustice/frontend": "^1.8.0",
"dfe-frontend-alpha": "^1.0.1",
"govuk-frontend": "^4.7.0",
"govuk-frontend": "^5.2.0",
"jquery": "^3.7.0"
}
}
2 changes: 1 addition & 1 deletion Childrens-Social-Care-CPD/styles/scss/application.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ $govuk-global-styles: true;
$govuk-new-link-styles: true;
$moj-images-path: "/assets/images/moj/";

@import "../../node_modules/govuk-frontend/govuk/all";
@import "../../node_modules/govuk-frontend/dist/govuk/all";
@import "../../node_modules/@ministryofjustice/frontend/moj/components/filter/filter";
@import '../../node_modules/dfe-frontend-alpha/packages/dfefrontend';
@import "overrides/dfe-overrides";
Expand Down
Binary file not shown.
Binary file not shown.
Binary file modified Childrens-Social-Care-CPD/wwwroot/assets/images/favicon.ico
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 5bfe892

Please sign in to comment.