cool-admin-vue/build/cool/lib/modules/index.ts
2022-04-08 13:19:55 +08:00

12 lines
276 B
TypeScript

import fs from "fs";
import { join } from "path";
export function getModules() {
try {
const dirs = fs.readdirSync(join(__dirname, "../../../../src/modules"));
return Promise.resolve(dirs.filter((e) => !e.includes(".")));
} catch (e) {
return Promise.reject(e);
}
}