-
Notifications
You must be signed in to change notification settings - Fork 27
Compile custom javascript files @uswds3.0 #58
Copy link
Copy link
Open
Labels
Affects: BuildRelates to the build processRelates to the build processAffects: CompilingRelated to compiling Sass or JavaScriptRelated to compiling Sass or JavaScriptContext: JavaScriptIssue is in JavaScriptIssue is in JavaScriptEnhancementNew feature or requestNew feature or requestType: Feature RequestNew functionalityNew functionality
Metadata
Metadata
Assignees
Labels
Affects: BuildRelates to the build processRelates to the build processAffects: CompilingRelated to compiling Sass or JavaScriptRelated to compiling Sass or JavaScriptContext: JavaScriptIssue is in JavaScriptIssue is in JavaScriptEnhancementNew feature or requestNew feature or requestType: Feature RequestNew functionalityNew functionality
Type
Fields
Give feedbackNo fields configured for issues without a type.
Projects
StatusShow more project fields
On Hold
Hello..
Can you please advise how to compile custom javascript files? So far, no issue with compiling scss files.
Lando.yml:
build-sass:
description: Run sass compiler within node service
cmd: cd /app/web/themes/custom/mytheme/ && npx gulp compile
watch-sass:
service: node
description: Run sass compiler within node service
cmd: cd /app/web/themes/custom/mytheme && npx gulp watch
lando watch-sass:
gulpfile.js
/* gulpfile.js */
const uswds = require("@uswds/compile");
/**
*/
uswds.settings.version = 3;
/**
*/
uswds.paths.dist.css = './files/css';
uswds.paths.dist.theme = './sass'; //custom styles
uswds.paths.dist.js = './assets/js';
uswds.paths.src.js = './js'; //custom scripts
// const copy = {
// js() {
// log(
// colors.blue,
//
Copy USWDS compiled JS: ${getSrcFrom("js")} → ${uswds.paths.src.js}// );
// return src(
${getSrcFrom("js")}/**/**.replace("//", "/")).pipe(// dest(uswds.paths.dist.js)
// );
// },
// };
/**
*/
exports.init = uswds.init;
exports.compile = uswds.compile;
exports.watch = uswds.watch;
exports.copyJS = uswds.copyJS;
Any help is appreciated