mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-20 22:40:31 -04: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/'));
|
.pipe(dest(paths.dist + 'js/'));
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
// Configure USWDS paths
|
// Configure USWDS paths
|
||||||
uswds.settings.version = 3;
|
uswds.settings.version = 3;
|
||||||
|
uswds.settings.compile = {
|
||||||
|
sass: true,
|
||||||
|
javascript: true,
|
||||||
|
sprites: false
|
||||||
|
};
|
||||||
|
|
||||||
uswds.paths.dist.css = paths.dist + 'css';
|
uswds.paths.dist.css = paths.dist + 'css';
|
||||||
uswds.paths.dist.js = paths.dist + 'js';
|
uswds.paths.dist.js = paths.dist + 'js';
|
||||||
uswds.paths.dist.img = paths.dist + 'img';
|
uswds.paths.dist.img = paths.dist + 'img';
|
||||||
@@ -140,17 +145,22 @@ const styles = async () => {
|
|||||||
await uswds.compile();
|
await uswds.compile();
|
||||||
};
|
};
|
||||||
|
|
||||||
// Task to copy USWDS assets
|
// Task to copy USWDS assetsconst
|
||||||
const copyUSWDSAssets = () => {
|
const copyUSWDSAssets = () => {
|
||||||
return src([
|
return src([
|
||||||
'node_modules/@uswds/uswds/dist/img/**/*',
|
'node_modules/@uswds/uswds/dist/img/**/*',
|
||||||
'node_modules/@uswds/uswds/dist/fonts/**/*'
|
'node_modules/@uswds/uswds/dist/fonts/**/*'
|
||||||
], { encoding: false })
|
], { encoding: false })
|
||||||
.pipe(dest(paths.dist + 'img/'))
|
.pipe(dest((file) => {
|
||||||
.pipe(dest(paths.dist + 'fonts/'));
|
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
|
// Optional backstopJS task
|
||||||
// Install gulp globally and run `gulp backstopTest`
|
// Install gulp globally and run `gulp backstopTest`
|
||||||
const backstopTest = (done) => {
|
const backstopTest = (done) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user