-
Notifications
You must be signed in to change notification settings - Fork 84
/
Copy pathmain.js
59 lines (54 loc) · 1.27 KB
/
main.js
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
59
import { createApp } from 'vue'
import App from './App.vue'
// import './registerServiceWorker'
import router from './router'
import store from './store'
import 'Css/index.css'
import { createI18n } from 'vue-i18n/index'
import hljs from 'highlight.js/lib/core'
import hljsVuePlugin from '@highlightjs/vue-plugin'
import {
english,
german,
portugese,
spanish,
russian,
chinese,
french,
ach,
builtin,
libraries,
tools,
learning,
users
} from './content'
var hljsDefineRobot = require('./js/robot-highlight.js')
hljsDefineRobot(hljs)
const resourcesList = {
builtin: builtin(),
libraries: libraries(),
tools: tools(),
learning: learning(),
users: users()
}
// const lang = window.localStorage.getItem('lang')
const i18n = createI18n({
locale: 'en-US',
messages: {
'en-US': { ...english(), resourcesList },
'de-DE': { ...german(), resourcesList },
'pt-PT': { ...portugese(), resourcesList },
'es-ES': { ...spanish(), resourcesList },
'ru-RU': { ...russian(), resourcesList },
'zh-CN': { ...chinese(), resourcesList },
'fr-FR': { ...french(), resourcesList },
'ach-UG': { ...ach(), resourcesList }
},
warnHtmlInMessage: 'off'
})
createApp(App)
.use(store)
.use(router)
.use(i18n)
.use(hljsVuePlugin)
.mount('#app')