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