项目初始化
This commit is contained in:
10
sheep/api/migration/index.js
Normal file
10
sheep/api/migration/index.js
Normal file
@@ -0,0 +1,10 @@
|
||||
const files = import.meta.glob('./*.js', { eager: true });
|
||||
let api = {};
|
||||
Object.keys(files).forEach((key) => {
|
||||
api = {
|
||||
...api,
|
||||
[key.replace(/(.*\/)*([^.]+).*/gi, '$2')]: files[key].default,
|
||||
};
|
||||
});
|
||||
|
||||
export default api;
|
Reference in New Issue
Block a user