dockview/packages/docs/locate.js
mathuo e85863b65f
475 improved docs (#484)
* chore: docs
2024-02-25 12:32:58 +00:00

21 lines
511 B
JavaScript

const fs = require('fs');
const path = require('path');
function* readAllFiles(dir) {
const files = fs.readdirSync(dir, { withFileTypes: true });
for (const file of files) {
if (file.isDirectory()) {
yield* readAllFiles(path.join(dir, file.name));
} else {
yield path.join(dir, file.name);
}
}
}
console.log(
Array.from(
readAllFiles(path.join(__dirname, '..', 'dockview-core', 'src'))
).filter((file) => file.endsWith('.scss'))
);