INNER CODE UNIT · JavaScript
copyFileIfExists
o19s/quepid · build_css.js:34
function copyFileIfExists(src, dest) {
try {
if (fs.existsSync(src)) {
ensureDirectoryExists(path.dirname(dest));
fs.copyFileSync(src, dest);
return true;
}
} catch (error) {
console.warn(`Warning: Could not copy ${src} to ${dest}:`, error.message);
}
return false;
}
const STYLES = 'app/assets/stylesheets';
// Every bundle starts with Bootstrap 5, its icons, Quepid's fonts, and the
// page skin shared by both bundles.
const BOOTSTRAP_BASE = [