cool-admin-vue/build/cool/lib/module/index.ts

11 lines
188 B
TypeScript
Raw Normal View History

2023-03-15 16:27:43 +08:00
import fs from "fs";
export function getModules() {
try {
const dirs = fs.readdirSync("./src/modules");
return dirs.filter((e) => !e.includes("."));
} catch (e) {
return [];
}
}