Skip to content

Commit

Permalink
Added config file for integration points with govuk-prototype-kit.
Browse files Browse the repository at this point in the history
To accompany the extensions proposal this config allows govuk-frontend to be an extension in the prototype kit.

Implementation details can be found here alphagov/govuk-prototype-kit#613
Proposal details can be found here alphagov/govuk-design-system-architecture#9
  • Loading branch information
Mat Carey committed Feb 7, 2019
1 parent afd0ea5 commit 43f3c40
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 3 deletions.
15 changes: 15 additions & 0 deletions package/govuk-prototype-kit.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"nunjucksPaths": [
"/",
"/components"
],
"scripts": [
"/all.js"
],
"assets": [
"/assets"
],
"sass": [
"/all.scss"
]
}
5 changes: 2 additions & 3 deletions tasks/gulp/__tests__/after-build-package.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,15 @@ describe('package/', () => {

const additionalFilesNotInSrc = [
'package.json',
'govuk-prototype-kit.config.json',
'**/macro-options.json'
]

return recursive(configPaths.src, filesToIgnore).then(
files => {
let filesNotInSrc = files
// Use glob to generate an array of files that accounts for wildcards in filenames
filesNotInSrc = glob.sync('{' + additionalFilesNotInSrc.join(',') + '}')
// Remove /package prefix from filenames
.map(file => file.replace(/^package\//, ''))
filesNotInSrc = glob.sync('{' + additionalFilesNotInSrc.join(',') + '}', { cwd: 'package' })

return files
// Remove /src prefix from filenames
Expand Down
1 change: 1 addition & 0 deletions tasks/gulp/clean.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ gulp.task('clean', () => {
`${destination}/**`,
`!${destination}`,
`!${destination}/package.json`,
`!${destination}/govuk-prototype-kit.config.json`,
`!${destination}/README.md`
])
} else {
Expand Down

0 comments on commit 43f3c40

Please sign in to comment.