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

13 lines
244 B
TypeScript
Raw Normal View History

2022-07-21 19:07:32 +08:00
import fs from "fs";
export function getModules() {
return new Promise((resolve, reject) => {
try {
const dirs = fs.readdirSync("./src/modules");
resolve(dirs.filter((e) => !e.includes(".")));
} catch (e) {
reject(e);
}
});
}