mirror of
https://github.com/cool-team-official/cool-admin-vue.git
synced 2024-11-01 22:20:27 +08:00
15 lines
259 B
TypeScript
15 lines
259 B
TypeScript
import fs from "fs";
|
|
|
|
export function createModule() {
|
|
let dirs: string[] = [];
|
|
|
|
try {
|
|
dirs = fs.readdirSync("./src/modules");
|
|
dirs = dirs.filter((e) => !e.includes("."));
|
|
} catch (err) {}
|
|
|
|
return `
|
|
export const dirs = ${JSON.stringify(dirs)}
|
|
`;
|
|
}
|