mirror of
https://github.com/flarum/core.git
synced 2025-08-29 19:09:58 +02:00
[1.x] [extensibility] Export all missing modules in compat (#4044)
* chore(emoji): export missing modules in compat API * chore(flags): export missing modules in compat API * chore(likes): export missing modules in compat API * chore(lock): export missing modules in compat API * chore(markdown): export missing modules in compat API * chore(mentions): export missing modules in compat API * chore(nicknames): export missing modules in compat API * chore(extension-manager): export missing modules in compat API * chore(statistics): export missing modules in compat API * chore(sticky): export missing modules in compat API * chore(subscriptions): export missing modules in compat API * chore(suspend): export missing modules in compat API * chore(tags): export missing modules in compat API * chore(core): export missing modules in compat API * chore: fix tsconfig
This commit is contained in:
11
extensions/statistics/js/src/admin/compat.ts
Normal file
11
extensions/statistics/js/src/admin/compat.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
import MiniStatisticsWidget from './components/MiniStatisticsWidget';
|
||||
import StatisticsPage from './components/StatisticsPage';
|
||||
import StatisticsWidget from './components/StatisticsWidget';
|
||||
import StatisticsWidgetDateSelectionModal from './components/StatisticsWidgetDateSelectionModal';
|
||||
|
||||
export default {
|
||||
'statistics/components/MiniStatisticsWidget': MiniStatisticsWidget,
|
||||
'statistics/components/StatisticsPage': StatisticsPage,
|
||||
'statistics/components/StatisticsWidget': StatisticsWidget,
|
||||
'statistics/components/StatisticsWidgetDateSelectionModal': StatisticsWidgetDateSelectionModal,
|
||||
};
|
@@ -13,3 +13,9 @@ app.initializers.add('flarum-statistics', () => {
|
||||
|
||||
app.extensionData.for('flarum-statistics').registerPage(StatisticsPage);
|
||||
});
|
||||
|
||||
// Expose compat API
|
||||
import statisticsCompat from './compat';
|
||||
import { compat } from '@flarum/core/admin';
|
||||
|
||||
Object.assign(compat, statisticsCompat);
|
||||
|
@@ -9,7 +9,8 @@
|
||||
// This will output typings to `dist-typings`
|
||||
"declarationDir": "./dist-typings",
|
||||
"paths": {
|
||||
"flarum/*": ["../../../framework/core/js/dist-typings/*"]
|
||||
"flarum/*": ["../../../framework/core/js/dist-typings/*"],
|
||||
"@flarum/core/*": ["../../../framework/core/js/dist-typings/*"],
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user