-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.ts
58 lines (49 loc) · 1.38 KB
/
main.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
import { createApp } from 'vue';
import { createPinia } from 'pinia';
import { router } from './router';
import dayjs from 'dayjs';
import relativeTime from 'dayjs/plugin/relativeTime';
import {
dialogs,
i18n,
I18nOptions,
notifications,
storeDialogs,
storeVueBus,
storeI18n,
storeNotifications,
vueBus,
} from '@v1nt1248/3nclient-lib/plugins';
import { piniaRouter } from '@/plugins/pinia-router';
import { initializationServices } from '@/services/services-provider';
import App from '@/views/app.vue';
import '@v1nt1248/3nclient-lib/variables.css';
import '@v1nt1248/3nclient-lib/style.css';
import '@/assets/styles/main.css';
import en from './data/i18/en.json';
const init = () => {
initializationServices().then(() => {
const pinia = createPinia();
pinia.use(piniaRouter);
pinia.use(storeVueBus);
pinia.use(storeI18n);
pinia.use(storeDialogs);
pinia.use(storeNotifications);
const app = createApp(App);
app.config.globalProperties.$router = router;
// app.config.globalProperties.$store = store
app.config.compilerOptions.isCustomElement = tag => {
return tag.startsWith('ui3n-');
};
dayjs.extend(relativeTime);
app
.use(pinia)
.use<I18nOptions>(i18n, { lang: 'en', messages: { en } })
.use(vueBus)
.use(dialogs)
.use(notifications)
.use(router)
.mount('#main');
});
};
init();