cool-admin-vue/build/cool/lib/module/index.ts
2022-07-21 19:07:32 +08:00

13 lines
244 B
TypeScript

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);
}
});
}