diff --git a/js/src/admin/components/index.ts b/js/src/admin/components/index.ts new file mode 100644 index 0000000..4b27f13 --- /dev/null +++ b/js/src/admin/components/index.ts @@ -0,0 +1,7 @@ +import MasqueradePage from './MasqueradePage'; +import SelectFieldOptionEditor from './SelectFieldOptionEditor'; + +export const components = { + MasqueradePage, + SelectFieldOptionEditor, +}; diff --git a/js/src/admin/index.ts b/js/src/admin/index.ts index f795143..0791154 100644 --- a/js/src/admin/index.ts +++ b/js/src/admin/index.ts @@ -33,3 +33,4 @@ app.initializers.add('fof-masquerade', () => { }); export { default as extend } from './extend'; +export * from './components'; diff --git a/js/src/forum/index.ts b/js/src/forum/index.ts index c28a01d..2ec12d1 100644 --- a/js/src/forum/index.ts +++ b/js/src/forum/index.ts @@ -1,38 +1,12 @@ import app from 'flarum/forum/app'; - import addProfilePane from './addProfilePane'; import mutateUserHero from './mutateUserHero'; -// Exports -import ProfileConfigurePane from './panes/ProfileConfigurePane'; -import ProfilePane from './panes/ProfilePane'; -import RootMasqueradePane from './panes/RootMasqueradePane'; -import BaseField from './types/BaseField'; -import BooleanField from './types/BooleanField'; -import EmailField from './types/EmailField'; -import SelectField from './types/SelectField'; -import TypeFactory from './types/TypeFactory'; -import UrlField from './types/UrlField'; - app.initializers.add('fof-masquerade', () => { addProfilePane(); mutateUserHero(); }); -const components = { - ProfileConfigurePane, - ProfilePane, - RootMasqueradePane, -}; - -const types = { - BaseField, - BooleanField, - EmailField, - SelectField, - TypeFactory, - UrlField, -}; - export { default as extend } from './extend'; -export { components, types }; +export * from './panes'; +export * from './types'; diff --git a/js/src/forum/panes/index.ts b/js/src/forum/panes/index.ts new file mode 100644 index 0000000..c0a72c3 --- /dev/null +++ b/js/src/forum/panes/index.ts @@ -0,0 +1,9 @@ +import ProfileConfigurePane from './ProfileConfigurePane'; +import ProfilePane from './ProfilePane'; +import RootMasqueradePane from './RootMasqueradePane'; + +export const panes = { + ProfileConfigurePane, + ProfilePane, + RootMasqueradePane, +}; diff --git a/js/src/forum/types/index.ts b/js/src/forum/types/index.ts new file mode 100644 index 0000000..fd18f1f --- /dev/null +++ b/js/src/forum/types/index.ts @@ -0,0 +1,15 @@ +import BaseField from './BaseField'; +import BooleanField from './BooleanField'; +import EmailField from './EmailField'; +import SelectField from './SelectField'; +import TypeFactory from './TypeFactory'; +import UrlField from './UrlField'; + +export const types = { + BaseField, + BooleanField, + EmailField, + SelectField, + TypeFactory, + UrlField, +};