cool-admin-vue/build/cool/module/index.ts
神仙都没用 1735d6258e 发布7.x
2023-09-28 13:50:15 +08:00

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