Skip to content

Commit

Permalink
Update frontend package paths
Browse files Browse the repository at this point in the history
  • Loading branch information
Jani Kraner committed May 18, 2018
1 parent f74a88b commit 9744cef
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 deletions.
3 changes: 2 additions & 1 deletion config/paths.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
"deploy": "deploy",
"public": "deploy/public/",
"nodemodules": "node_modules/",
"govukfrontend": "node_modules/@govuk-frontend/",
"govukfrontend": "node_modules/@govuk-frontend/frontend/",
"govukfrontendcomponents": "node_modules/@govuk-frontend/frontend/components/",
"iframeresizer": "node_modules/iframe-resizer/",
"clipboard": "node_modules/clipboard/dist/",
"html5shiv": "node_modules/html5shiv/dist/",
Expand Down
6 changes: 3 additions & 3 deletions lib/colours.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
const assert = require('assert')
const scssToJson = require('scss-to-json')

const coloursAppliedSCSS = scssToJson('./node_modules/@govuk-frontend/globals/settings/_colours-applied.scss', {
dependencies: [{path: './node_modules/@govuk-frontend/globals/settings/_colours-palette.scss'}]
const coloursAppliedSCSS = scssToJson('./node_modules/@govuk-frontend/frontend/settings/_colours-applied.scss', {
dependencies: [{path: './node_modules/@govuk-frontend/frontend/settings/_colours-palette.scss'}]
})

const coloursPaletteSCSS = scssToJson('./node_modules/@govuk-frontend/globals/settings/_colours-palette.scss')
const coloursPaletteSCSS = scssToJson('./node_modules/@govuk-frontend/frontend/settings/_colours-palette.scss')

// combine both SCSS data objects - some Main colours are only in Palette
const coloursSCSS = Object.assign(coloursAppliedSCSS, coloursPaletteSCSS)
Expand Down
6 changes: 3 additions & 3 deletions lib/metalsmith.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const views = [
paths.layouts,
paths.partials,
paths.components,
paths.govukfrontend
paths.govukfrontendcomponents
]

// static site generator
Expand Down Expand Up @@ -56,8 +56,8 @@ module.exports = metalsmith(__dirname) // __dirname defined by node.js: name of

// copy static assets from node_modules/@govukfrontend
.use(assets({
source: '../' + paths.govukfrontend + 'icons/',
destination: 'icons'
source: '../' + paths.govukfrontend + 'assets/',
destination: 'assets'
}))

// copy static assets from node_modules/iframe-resizer
Expand Down
2 changes: 1 addition & 1 deletion tasks/serve.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ metalsmith.use(browsersync({
files: [
paths.source + '**/*',
paths.views + '**/*',
'node_modules/@govuk-frontend/**/*'
'node_modules/@govuk-frontend/frontend/**/*'
] // files to watch
}))

Expand Down

0 comments on commit 9744cef

Please sign in to comment.