nycki.net/tools/list-files.js
Nick Lamicela 48c023d582
All checks were successful
/ build (push) Successful in 25s
scripts
2024-12-27 22:22:51 -08:00

16 lines
393 B
JavaScript

import fs from 'node:fs/promises';
import path from 'node:path';
async function main() {
let count = 0;
for (const file of await fs.readdir('_site', { recursive: true })) {
const absolute = path.join('_site', file);
const stat = await fs.stat(absolute);
if (stat.isDirectory()) continue;
console.log(file);
count += 1;
}
console.log(`total: ${count}`);
}
main();