Completed
Push — master ( 05fb45...272099 )
by Florian
04:05
created

assets/js/apps/Result/bootstrap.js   A

Complexity

Total Complexity 1
Complexity/F 0

Size

Lines of Code 34
Function Count 0

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 18
dl 0
loc 34
rs 10
c 1
b 0
f 0
cc 1
nc 2
mnd 1
bc 1
fnc 0
bpm 0
cpm 0
noi 1
1
import Vue from 'vue'
2
import VueI18n from 'vue-i18n'
3
// components
4
import {FontAwesomeIcon} from '@fortawesome/vue-fontawesome'
5
// app
6
import Result from './result'
7
// messages
8
import Messages from '../../localization/result'
9
import mergeMessages from '../../localization/shared/_all'
10
11
Vue.config.productionTip = false;
12
13
14
if (document.getElementById("result") !== null) {
15
    // register plugins
16
    Vue.use(VueI18n);
17
18
    // register components
19
    Vue.component('font-awesome-icon', FontAwesomeIcon);
20
21
    // initialize messages
22
    const i18n = new VueI18n({
23
        locale: document.documentElement.lang.substr(0, 2),
24
        messages: mergeMessages(Messages),
25
    });
26
27
    // boot app
28
    new Vue({
0 ignored issues
show
Unused Code Best Practice introduced by
The object created with new Vue({IdentifierNode(...,None,false,false))))}) is not used but discarded. Consider invoking another function instead of a constructor if you are doing this purely for side effects.
Loading history...
29
        i18n,
30
        el: '#result',
31
        template: '<Result/>',
32
        components: {Result}
33
    });
34
}