Skip to content

Commit

Permalink
chore: remove node_modules from all import paths
Browse files Browse the repository at this point in the history
  • Loading branch information
colinrotherham committed Feb 25, 2025
1 parent 5a2e8cf commit fc672fd
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion docs/_includes/layouts/partials/navigation.njk
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{%- from "node_modules/@ministryofjustice/frontend/moj/components/primary-navigation/macro.njk" import mojPrimaryNavigation %}
{%- from "moj/components/primary-navigation/macro.njk" import mojPrimaryNavigation %}

{{ mojPrimaryNavigation({
items: [
Expand Down
6 changes: 3 additions & 3 deletions docs/assets/stylesheets/application.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ $govuk-assets-path: "../" !default;
$govuk-suppressed-warnings: ("govuk-typography-scale-14");

// GOV.UK Frontend
@import "node_modules/govuk-frontend/dist/govuk";
@import "govuk-frontend/dist/govuk";

// MOJ Frontend
@import "src/moj/all";
@import "../../../src/moj/all";

// highlight.js
@import "node_modules/highlight.js/scss/github";
@import "highlight.js/scss/github";

// Custom documentation components
@import "./components/accordions";
Expand Down
2 changes: 1 addition & 1 deletion docs/assets/stylesheets/govuk-frontend.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ $govuk-global-styles: false;
$govuk-suppressed-warnings: ("govuk-typography-scale-14");

// GOV.UK Frontend
@import "node_modules/govuk-frontend/dist/govuk";
@import "govuk-frontend/dist/govuk";
2 changes: 1 addition & 1 deletion docs/assets/stylesheets/moj-frontend.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ $moj-page-width: 1220px !default;
$moj-assets-path: "../" !default;

// MOJ Frontend
@import "src/moj/all";
@import "../../../src/moj/all";
6 changes: 3 additions & 3 deletions gulp/dist-scss/all.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
$_govuk-imported-modules: ("govuk/objects/width-container") !default;

@import "node_modules/govuk-frontend/dist/govuk/base";
@import "node_modules/govuk-frontend/dist/govuk/objects/width-container";
@import "package/moj/all";
@import "govuk-frontend/dist/govuk/base";
@import "govuk-frontend/dist/govuk/objects/width-container";
@import "@ministryofjustice/frontend/moj/all";
2 changes: 1 addition & 1 deletion gulp/tasks/styles.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ function compileStyles(assetPath, { srcPath, destPath, output = {} }) {

const taskFn = async () => {
const { css } = await compileAsync(from, {
loadPaths: ['./'],
loadPaths: ['node_modules'],
quietDeps: true,
silenceDeprecations: [
'color-functions',
Expand Down
2 changes: 1 addition & 1 deletion src/moj/all.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
$govuk-suppressed-warnings: ("govuk-typography-scale-14");

@import "node_modules/govuk-frontend/dist/govuk/base";
@import "govuk-frontend/dist/govuk/base";

@import "settings/all";
@import "helpers/all";
Expand Down
2 changes: 1 addition & 1 deletion src/moj/components/cookie-banner/_cookie-banner.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import "node_modules/govuk-frontend/dist/govuk/objects/width-container";
@import "govuk-frontend/dist/govuk/objects/width-container";

.moj-cookie-banner {
box-sizing: border-box;
Expand Down

0 comments on commit fc672fd

Please sign in to comment.