1
0
mirror of https://github.com/flarum/core.git synced 2025-08-01 14:10:37 +02:00

Move forum & admin app declarations to separate files

This commit is contained in:
David Sevilla Martin
2021-03-24 15:52:42 -04:00
committed by David Sevilla Martín
parent 1c4817a0b3
commit 2de57af7c8
4 changed files with 18 additions and 12 deletions

8
js/src/admin/app.ts Normal file
View File

@@ -0,0 +1,8 @@
import Admin from './AdminApplication';
const app = new Admin();
// @ts-ignore
window.app = app;
export default app;

View File

@@ -1,9 +1,4 @@
import AdminApplication from './AdminApplication';
const app = new AdminApplication();
// Backwards compatibility
window.app = app;
import app from './app';
export { app };

8
js/src/forum/app.ts Normal file
View File

@@ -0,0 +1,8 @@
import Forum from './ForumApplication';
const app = new Forum();
// @ts-ignore
window.app = app;
export default app;

View File

@@ -1,12 +1,7 @@
import 'expose-loader?punycode!punycode';
import 'expose-loader?ColorThief!color-thief-browser';
import ForumApplication from './ForumApplication';
const app = new ForumApplication();
// Backwards compatibility
window.app = app;
import app from './app';
export { app };