mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-06-19 11:41:23 +08:00
TS: Converted app file and animations service
Extracted functions out of app file during changes to clean up. Altered animation function to use normal css prop names instead of JS CSS prop names.
This commit is contained in:
23
resources/js/app.ts
Normal file
23
resources/js/app.ts
Normal file
@ -0,0 +1,23 @@
|
||||
import {EventManager} from './services/events';
|
||||
import {HttpManager} from './services/http';
|
||||
import {Translator} from './services/translations';
|
||||
import * as componentMap from './components/index';
|
||||
import {ComponentStore} from './services/components';
|
||||
import {baseUrl, importVersioned} from "./services/util";
|
||||
|
||||
// eslint-disable-next-line no-underscore-dangle
|
||||
window.__DEV__ = false;
|
||||
|
||||
// Make common important util functions global
|
||||
window.baseUrl = baseUrl;
|
||||
window.importVersioned = importVersioned;
|
||||
|
||||
// Setup events, http & translation services
|
||||
window.$http = new HttpManager();
|
||||
window.$events = new EventManager();
|
||||
window.$trans = new Translator();
|
||||
|
||||
// Load & initialise components
|
||||
window.$components = new ComponentStore();
|
||||
window.$components.register(componentMap);
|
||||
window.$components.init();
|
Reference in New Issue
Block a user