}), b.add("klaw-sync", () => { klawSync("node_modules", {}); }), b.add("recur-readdir sync", () => {
const getUrlFilePaths = () => { const options = { nofile: true }; const paths = klawSync(LOCAL_URL_DIR, options); return paths; }
function findLastModifiedFile(path) { if (!fse.existsSync(path)) { return undefined; } const stat = fse.statSync(path); if (!stat || (!stat.isFile() && !stat.isDirectory())) { return undefined; } if (stat.isFile()) { return { path: path, stats: stat }; } const files = klawSync(path, { nodir: true }); return files.reduce((previous, current) => { return !previous || current.stats.mtime > previous.stats.mtime ? current : previous; }, undefined); }