mirror of
https://github.com/flarum/framework.git
synced 2025-02-18 12:33:22 +08:00
Move forum & admin app declarations to separate files
This commit is contained in:
parent
e60bf67c61
commit
79751d50e9
8
framework/core/js/src/admin/app.ts
Normal file
8
framework/core/js/src/admin/app.ts
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
import Admin from './AdminApplication';
|
||||||
|
|
||||||
|
const app = new Admin();
|
||||||
|
|
||||||
|
// @ts-ignore
|
||||||
|
window.app = app;
|
||||||
|
|
||||||
|
export default app;
|
|
@ -1,9 +1,4 @@
|
||||||
import AdminApplication from './AdminApplication';
|
import app from './app';
|
||||||
|
|
||||||
const app = new AdminApplication();
|
|
||||||
|
|
||||||
// Backwards compatibility
|
|
||||||
window.app = app;
|
|
||||||
|
|
||||||
export { app };
|
export { app };
|
||||||
|
|
||||||
|
|
8
framework/core/js/src/forum/app.ts
Normal file
8
framework/core/js/src/forum/app.ts
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
import Forum from './ForumApplication';
|
||||||
|
|
||||||
|
const app = new Forum();
|
||||||
|
|
||||||
|
// @ts-ignore
|
||||||
|
window.app = app;
|
||||||
|
|
||||||
|
export default app;
|
|
@ -1,12 +1,7 @@
|
||||||
import 'expose-loader?punycode!punycode';
|
import 'expose-loader?punycode!punycode';
|
||||||
import 'expose-loader?ColorThief!color-thief-browser';
|
import 'expose-loader?ColorThief!color-thief-browser';
|
||||||
|
|
||||||
import ForumApplication from './ForumApplication';
|
import app from './app';
|
||||||
|
|
||||||
const app = new ForumApplication();
|
|
||||||
|
|
||||||
// Backwards compatibility
|
|
||||||
window.app = app;
|
|
||||||
|
|
||||||
export { app };
|
export { app };
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user