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
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