Mercurial > gemma
comparison client/src/main.js @ 1672:5af8c82c3d21
refac: improved bundle-size
author | Thomas Junk <thomas.junk@intevation.de> |
---|---|
date | Mon, 24 Dec 2018 14:41:37 +0100 |
parents | 2ee243f9a7ee |
children | 7e3a705f520a |
comparison
equal
deleted
inserted
replaced
1671:89b38d7e7b6a | 1672:5af8c82c3d21 |
---|---|
25 import "../node_modules/animate.css/animate.min.css"; | 25 import "../node_modules/animate.css/animate.min.css"; |
26 import "../node_modules/ol/ol.css"; | 26 import "../node_modules/ol/ol.css"; |
27 import "../node_modules/highlight.js/styles/paraiso-dark.css"; | 27 import "../node_modules/highlight.js/styles/paraiso-dark.css"; |
28 import "../node_modules/vue-snotify/styles/material.css"; | 28 import "../node_modules/vue-snotify/styles/material.css"; |
29 import VTooltip from "v-tooltip"; | 29 import VTooltip from "v-tooltip"; |
30 import { library } from "@fortawesome/fontawesome-svg-core"; | |
31 import { | |
32 faAngleDown, | |
33 faAngleLeft, | |
34 faAngleRight, | |
35 faAngleUp, | |
36 faBars, | |
37 faBook, | |
38 faChartArea, | |
39 faCheck, | |
40 faCity, | |
41 faClipboardCheck, | |
42 faClock, | |
43 faCloudUploadAlt, | |
44 faCopy, | |
45 faDrawPolygon, | |
46 faExclamationTriangle, | |
47 faEye, | |
48 faEyeSlash, | |
49 faFilePdf, | |
50 faFolderPlus, | |
51 faInfo, | |
52 faLayerGroup, | |
53 faMapMarkedAlt, | |
54 faMinus, | |
55 faPaperPlane, | |
56 faPencilAlt, | |
57 faPlay, | |
58 faPlus, | |
59 faPowerOff, | |
60 faRuler, | |
61 faSearch, | |
62 faShip, | |
63 faSortAmountDown, | |
64 faSortAmountUp, | |
65 faSpinner, | |
66 faStar, | |
67 faTasks, | |
68 faTimes, | |
69 faTrash, | |
70 faUpload, | |
71 faUser, | |
72 faUsersCog, | |
73 faWater, | |
74 faWrench | |
75 } from "@fortawesome/free-solid-svg-icons"; | |
76 import { faAdn } from "@fortawesome/free-brands-svg-icons"; | |
77 import { FontAwesomeIcon } from "@fortawesome/vue-fontawesome"; | |
78 import VueClipboard from "vue-clipboard2"; | 30 import VueClipboard from "vue-clipboard2"; |
79 | 31 |
80 library.add( | |
81 faAdn, | |
82 faAngleDown, | |
83 faAngleLeft, | |
84 faAngleRight, | |
85 faAngleUp, | |
86 faBars, | |
87 faBook, | |
88 faChartArea, | |
89 faCheck, | |
90 faCity, | |
91 faClipboardCheck, | |
92 faClock, | |
93 faCloudUploadAlt, | |
94 faCopy, | |
95 faDrawPolygon, | |
96 faExclamationTriangle, | |
97 faEye, | |
98 faEyeSlash, | |
99 faFilePdf, | |
100 faFolderPlus, | |
101 faInfo, | |
102 faLayerGroup, | |
103 faMapMarkedAlt, | |
104 faMinus, | |
105 faPaperPlane, | |
106 faPencilAlt, | |
107 faPlay, | |
108 faPlus, | |
109 faPowerOff, | |
110 faRuler, | |
111 faSearch, | |
112 faShip, | |
113 faSortAmountDown, | |
114 faSortAmountUp, | |
115 faSpinner, | |
116 faStar, | |
117 faTasks, | |
118 faTimes, | |
119 faTrash, | |
120 faUpload, | |
121 faUser, | |
122 faUsersCog, | |
123 faWater, | |
124 faWrench | |
125 ); | |
126 import ToggleButton from "vue-js-toggle-button"; | 32 import ToggleButton from "vue-js-toggle-button"; |
127 | 33 |
128 Vue.use(ToggleButton); | 34 Vue.use(ToggleButton); |
129 | |
130 Vue.component("font-awesome-icon", FontAwesomeIcon); | |
131 | 35 |
132 Vue.use(VTooltip); | 36 Vue.use(VTooltip); |
133 | 37 |
134 const options = { | 38 const options = { |
135 toast: { | 39 toast: { |
172 availableLanguages: supportedLanguages, | 76 availableLanguages: supportedLanguages, |
173 defaultLanguage: defaultLanguage | 77 defaultLanguage: defaultLanguage |
174 }); | 78 }); |
175 | 79 |
176 Vue.config.productionTip = false; | 80 Vue.config.productionTip = false; |
177 | 81 let app; |
178 const app = new Vue({ | 82 import("./fontawesome").then(Vue => { |
179 router, | 83 app = new Vue({ |
180 store, | 84 router, |
181 render: h => h(App) | 85 store, |
182 }).$mount("#app"); | 86 render: h => h(App) |
87 }).$mount("#app"); | |
88 }); | |
183 | 89 |
184 export default app; | 90 export default app; |