UNPKG

@awesome-fe/translate

Version:
19 lines 564 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.traverse = void 0; const fs_1 = require("fs"); const path_1 = require("path"); function* traverse(root) { const files = (0, fs_1.readdirSync)(root, { withFileTypes: true }); for (const file of files) { const fullPath = (0, path_1.join)(root, file.name); if (file.isDirectory()) { yield* traverse(fullPath); } else { yield fullPath; } } } exports.traverse = traverse; //# sourceMappingURL=traverse.js.map