export function importAll(r: any) {
    const modules: any = {};
    r.keys().forEach( (key: any) => {
        const m = (r(key)).default;
        const n = m.extendOptions.name;
        modules[n] = m;
    });
    return modules;
}
