FitTrackee/fittrackee_client/src/main.ts

55 lines
1.0 KiB
TypeScript
Raw Normal View History

2021-10-23 21:14:47 +02:00
import {
Chart,
BarElement,
LineElement,
PointElement,
Legend,
Title,
Tooltip,
Filler,
BarController,
CategoryScale,
LineController,
LinearScale,
} from 'chart.js'
import ChartDataLabels from 'chartjs-plugin-datalabels'
2021-07-25 13:23:25 +02:00
import { createApp } from 'vue'
2021-08-11 22:21:26 +02:00
2021-07-25 13:23:25 +02:00
import './registerServiceWorker'
2021-08-11 22:21:26 +02:00
import App from './App.vue'
import i18n from './i18n'
2021-07-25 13:23:25 +02:00
import router from './router'
import store from './store'
import { customComponents } from '@/custom-components'
import { clickOutsideDirective } from '@/directives'
2021-10-23 15:47:17 +02:00
import { sportColors } from '@/utils/sports'
2021-10-23 21:14:47 +02:00
Chart.register(
BarElement,
LineElement,
PointElement,
Legend,
Title,
Tooltip,
Filler,
BarController,
CategoryScale,
LineController,
LinearScale,
ChartDataLabels
)
const app = createApp(App)
2021-10-23 15:47:17 +02:00
.provide('sportColors', sportColors)
.use(i18n)
.use(store)
.use(router)
.directive('click-outside', clickOutsideDirective)
customComponents.forEach((component) => {
app.component(component.name, component.target)
})
app.mount('#app')