mirror of
https://github.com/cool-team-official/cool-admin-vue.git
synced 2024-11-01 14:10:27 +08:00
13 lines
244 B
TypeScript
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);
|
||
|
}
|
||
|
});
|
||
|
}
|