19 lines
452 B
JavaScript
19 lines
452 B
JavaScript
import gather from '@/util/gather.js';
|
|
|
|
const Gathered = gather(
|
|
import.meta.glob(['./*.js', '!./*.test.js'], {eager: true, import: 'default'}),
|
|
);
|
|
|
|
const Components = {};
|
|
for (const componentName in Gathered) {
|
|
Components[componentName] = eval(`
|
|
((Gathered) => (
|
|
class ${componentName} extends Gathered['${componentName}'] {
|
|
static componentName = '${componentName}';
|
|
}
|
|
))
|
|
`)(Gathered);
|
|
}
|
|
|
|
export default Components;
|