mirror of
https://github.com/WeBankFinTech/fes.js.git
synced 2025-08-25 07:15:40 +08:00
* feat(plugin-layout): 支持运行时配置menus * refactor(plugin-model): 去掉provide * refactor(plugin-layout): 优化runtimeConfig,重新实现运行时menus配置方式,修复多页时setup执行两次的bug * feat(plugin-layout): 菜单支持配置默认展开等 * refactor: 优化
17 lines
422 B
JavaScript
17 lines
422 B
JavaScript
import { glob } from '@fesjs/utils';
|
|
import { getValidFiles } from '.';
|
|
|
|
export function getModels(cwd, pattern) {
|
|
const files = glob
|
|
.sync(pattern || '**/*.{js,jsx,ts,tsx}', {
|
|
cwd
|
|
})
|
|
.filter(
|
|
file => !file.endsWith('.d.ts')
|
|
&& !file.endsWith('.test.js')
|
|
&& !file.endsWith('.test.jsx')
|
|
);
|
|
|
|
return getValidFiles(files, cwd);
|
|
}
|