From ad17cd297f5885cac6958ac94fec8ea6c4d9a31b Mon Sep 17 00:00:00 2001 From: Dilwoar Hussain Date: Tue, 20 May 2025 10:32:33 +0100 Subject: [PATCH] Migrate digital land frontend package to npm. This will make things more stable long term and easier to upgrade. --- assets/scss/_typography.scss | 2 +- assets/scss/application.scss | 4 ++-- assets/scss/components/_summary-card.scss | 2 +- assets/scss/components/_test-grid.scss | 14 +++++++------- digital-land-frontend.config.json | 1 + package.json | 4 ++-- 6 files changed, 14 insertions(+), 13 deletions(-) diff --git a/assets/scss/_typography.scss b/assets/scss/_typography.scss index 7bd05ca..67289cc 100644 --- a/assets/scss/_typography.scss +++ b/assets/scss/_typography.scss @@ -42,5 +42,5 @@ $govuk-typography-scale: map-merge($govuk-typography-scale, $app-typography-scal .app-heading--divider { padding-bottom: govuk-spacing(2); - border-bottom: 4px solid govuk-colour(blue); + border-bottom: 4px solid govuk-colour("blue"); } diff --git a/assets/scss/application.scss b/assets/scss/application.scss index 53ddc13..c347d97 100644 --- a/assets/scss/application.scss +++ b/assets/scss/application.scss @@ -176,11 +176,11 @@ } } -// temp disable cookie banner +// temp disable cookie banner #global-cookie-message { display: none !important; } .app-tests-header { - border-bottom: 4px solid govuk-colour(blue); + border-bottom: 4px solid govuk-colour("blue"); display: flex; justify-content: space-between; margin-bottom: govuk-spacing(4); diff --git a/assets/scss/components/_summary-card.scss b/assets/scss/components/_summary-card.scss index edb0f31..131e9df 100644 --- a/assets/scss/components/_summary-card.scss +++ b/assets/scss/components/_summary-card.scss @@ -2,7 +2,7 @@ border: 1px solid $govuk-border-colour; &:target { - border: 5px solid govuk-colour(blue); + border: 5px solid govuk-colour("blue"); } /* Card header */ diff --git a/assets/scss/components/_test-grid.scss b/assets/scss/components/_test-grid.scss index b549663..e7c1da1 100644 --- a/assets/scss/components/_test-grid.scss +++ b/assets/scss/components/_test-grid.scss @@ -106,7 +106,7 @@ background: #ffa537; box-sizing: border-box; } - + &--fail { background: govuk-colour("red"); } @@ -126,9 +126,9 @@ } &--warn { - color: darken(govuk-colour(orange),50); + color: darken(govuk-colour("orange"),50); a { - color: darken(govuk-colour(orange),50); + color: darken(govuk-colour("orange"),50); } } @@ -161,7 +161,7 @@ .app-test-group:target { padding-left: govuk-spacing(5); - border-left: 4px solid govuk-colour(blue); + border-left: 4px solid govuk-colour("blue"); } .app-sticky-bottom { @@ -170,8 +170,8 @@ bottom: 50%; width: 100%; a { - // background: rgba(govuk-colour(blue),0.95); - // background: govuk-colour(light-grey); + // background: rgba(govuk-colour("blue"),0.95); + // background: govuk-colour("light-grey"); padding: govuk-spacing(2) govuk-spacing(2); display: inline-block; transform: translateX(calc(-100% - 2em)); @@ -180,7 +180,7 @@ &--full { position: sticky; bottom: 0%; - background: rgba(govuk-colour(blue),0.95); + background: rgba(govuk-colour("blue"),0.95); background: rgba(white,0.9); padding: govuk-spacing(2) 0; border-top: 1px solid $govuk-border-colour; diff --git a/digital-land-frontend.config.json b/digital-land-frontend.config.json index 851f505..f18b9b1 100644 --- a/digital-land-frontend.config.json +++ b/digital-land-frontend.config.json @@ -1,4 +1,5 @@ { + "digitalLandFrontendPath": "node_modules/@planning-data/digital-land-frontend/", "scssPath": "./assets/scss", "jsOutputPath": "application/static/javascripts", "stylesheetsOutputPath": "application/static/stylesheets", diff --git a/package.json b/package.json index 9401a74..03d0a9d 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,7 @@ "watch:assets": "npm run nps watch.assets", "watch:pages": "npm run nps watch.pages", "watch": "npm-run-all --parallel watch:*", - "nps": "nps -c ./node_modules/digital-land-frontend/package-scripts.js", + "nps": "nps -c ./node_modules/@planning-data/digital-land-frontend/package-scripts.js", "copyjs": "rsync -ar assets/javascripts/ application/static/javascripts", "postinstall": "npm run copyjs && npm run nps copy.javascripts && npm run nps build.stylesheets && npm run nps build.javascripts", "start": "run-p watch flask" @@ -26,7 +26,7 @@ "url": "https://github.com/digital-land/maturity-model-prototype/issues" }, "dependencies": { - "digital-land-frontend": "https://gitpkg.now.sh/digital-land/digital-land-frontend/package?main" + "@planning-data/digital-land-frontend": "^0.3.4" }, "devDependencies": { "npm-run-all": "^4.1.5",