cool-admin-vue/build/cool/lib/module/index.ts
2023-03-15 16:27:43 +08:00

11 lines
188 B
TypeScript

import fs from "fs";
export function getModules() {
try {
const dirs = fs.readdirSync("./src/modules");
return dirs.filter((e) => !e.includes("."));
} catch (e) {
return [];
}
}