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

13 lines
217 B
TypeScript
Raw Normal View History

2023-09-28 13:50:15 +08:00
import fs from "fs";
export function createModule() {
let dirs: string[] = [];
try {
dirs = fs.readdirSync("./src/modules");
dirs = dirs.filter((e) => !e.includes("."));
} catch (err) {}
return { dirs };
2023-09-28 13:50:15 +08:00
}