mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-03 21:21:14 -04:00
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:
16
gulpfile.js
16
gulpfile.js
@@ -28,7 +28,8 @@ const paths = {
|
|||||||
templates: 'app/templates/',
|
templates: 'app/templates/',
|
||||||
npm: 'node_modules/',
|
npm: 'node_modules/',
|
||||||
template: 'node_modules/govuk_template_jinja/',
|
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
|
// 3. TASKS
|
||||||
@@ -70,6 +71,12 @@ const copy = {
|
|||||||
return src(paths.src + 'error_pages/**/*')
|
return src(paths.src + 'error_pages/**/*')
|
||||||
.pipe(dest(paths.dist + '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',
|
outputStyle: 'compressed',
|
||||||
includePaths: [
|
includePaths: [
|
||||||
paths.npm + 'govuk-elements-sass/public/sass/',
|
paths.npm + 'govuk-elements-sass/public/sass/',
|
||||||
paths.toolkit + 'stylesheets/'
|
paths.toolkit + 'stylesheets/',
|
||||||
|
paths.govuk_frontend,
|
||||||
]
|
]
|
||||||
}))
|
}))
|
||||||
.pipe(plugins.base64('../..'))
|
.pipe(plugins.base64('../..'))
|
||||||
@@ -136,7 +144,8 @@ const images = () => {
|
|||||||
return src([
|
return src([
|
||||||
paths.src + 'images/**/*',
|
paths.src + 'images/**/*',
|
||||||
paths.toolkit + 'images/**/*',
|
paths.toolkit + 'images/**/*',
|
||||||
paths.template + 'assets/images/**/*'
|
paths.template + 'assets/images/**/*',
|
||||||
|
paths.govuk_frontend + 'assets/images/**/*'
|
||||||
])
|
])
|
||||||
.pipe(dest(paths.dist + 'images/'))
|
.pipe(dest(paths.dist + 'images/'))
|
||||||
};
|
};
|
||||||
@@ -192,6 +201,7 @@ const defaultTask = parallel(
|
|||||||
copy.govuk_template.fonts,
|
copy.govuk_template.fonts,
|
||||||
copy.govuk_template.css,
|
copy.govuk_template.css,
|
||||||
copy.govuk_template.js,
|
copy.govuk_template.js,
|
||||||
|
copy.govuk_frontend.fonts,
|
||||||
images
|
images
|
||||||
),
|
),
|
||||||
series(
|
series(
|
||||||
|
|||||||
Reference in New Issue
Block a user