mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-02-06 11:23:48 -05:00
Added config
This commit is contained in:
20
gulpfile.js
20
gulpfile.js
@@ -125,9 +125,14 @@ const copyUSWDSJS = () => {
|
||||
.pipe(dest(paths.dist + 'js/'));
|
||||
};
|
||||
|
||||
|
||||
// Configure USWDS paths
|
||||
uswds.settings.version = 3;
|
||||
uswds.settings.compile = {
|
||||
sass: true,
|
||||
javascript: true,
|
||||
sprites: false
|
||||
};
|
||||
|
||||
uswds.paths.dist.css = paths.dist + 'css';
|
||||
uswds.paths.dist.js = paths.dist + 'js';
|
||||
uswds.paths.dist.img = paths.dist + 'img';
|
||||
@@ -140,17 +145,22 @@ const styles = async () => {
|
||||
await uswds.compile();
|
||||
};
|
||||
|
||||
// Task to copy USWDS assets
|
||||
// Task to copy USWDS assetsconst
|
||||
const copyUSWDSAssets = () => {
|
||||
return src([
|
||||
'node_modules/@uswds/uswds/dist/img/**/*',
|
||||
'node_modules/@uswds/uswds/dist/fonts/**/*'
|
||||
], { encoding: false })
|
||||
.pipe(dest(paths.dist + 'img/'))
|
||||
.pipe(dest(paths.dist + 'fonts/'));
|
||||
.pipe(dest((file) => {
|
||||
if (file.path.includes('/img/')) {
|
||||
return paths.dist + 'img/';
|
||||
} else if (file.path.includes('/fonts/')) {
|
||||
return paths.dist + 'fonts/';
|
||||
}
|
||||
return paths.dist;
|
||||
}));
|
||||
};
|
||||
|
||||
|
||||
// Optional backstopJS task
|
||||
// Install gulp globally and run `gulp backstopTest`
|
||||
const backstopTest = (done) => {
|
||||
|
||||
Reference in New Issue
Block a user