Add GOVUK Frontend to the frontend build

- copies across the images
- adds the Sass folder to the Sass include paths

JS is added file-by-file so will be added when
specific files are needed.
This commit is contained in:
Tom Byers
2019-10-09 15:03:35 +01:00
parent 47f1e90546
commit d26ef59182

View File

@@ -28,7 +28,8 @@ const paths = {
templates: 'app/templates/',
npm: 'node_modules/',
template: 'node_modules/govuk_template_jinja/',
toolkit: 'node_modules/govuk_frontend_toolkit/'
toolkit: 'node_modules/govuk_frontend_toolkit/',
govuk_frontend: 'node_modules/govuk-frontend/'
};
// 3. TASKS
@@ -70,6 +71,12 @@ const copy = {
return src(paths.src + 'error_pages/**/*')
.pipe(dest(paths.dist + 'error_pages/'))
}
},
govuk_frontend: {
fonts: () => {
return src(paths.govuk_frontend + 'assets/fonts/**/*')
.pipe(dest(paths.dist + 'fonts/'));
}
}
};
@@ -122,7 +129,8 @@ const sass = () => {
outputStyle: 'compressed',
includePaths: [
paths.npm + 'govuk-elements-sass/public/sass/',
paths.toolkit + 'stylesheets/'
paths.toolkit + 'stylesheets/',
paths.govuk_frontend,
]
}))
.pipe(plugins.base64('../..'))
@@ -136,7 +144,8 @@ const images = () => {
return src([
paths.src + 'images/**/*',
paths.toolkit + 'images/**/*',
paths.template + 'assets/images/**/*'
paths.template + 'assets/images/**/*',
paths.govuk_frontend + 'assets/images/**/*'
])
.pipe(dest(paths.dist + 'images/'))
};
@@ -192,6 +201,7 @@ const defaultTask = parallel(
copy.govuk_template.fonts,
copy.govuk_template.css,
copy.govuk_template.js,
copy.govuk_frontend.fonts,
images
),
series(