Files: 24407748211492167d2e4dbb085864747d36783a / src / main.js
1405 bytesRaw
1 | // The following line loads the standalone build of Vue instead of the runtime-only build, |
2 | // so you don't have to do: import Vue from 'vue/dist/vue' |
3 | // This is done with the browser options. For the config, see package.json |
4 | import Vue from 'vue' |
5 | import App from './App.vue' |
6 | import Public from './components/Public.vue' |
7 | |
8 | // Vue extensions |
9 | import VueTimeago from 'vue-timeago' |
10 | Vue.use(VueTimeago, { |
11 | name: 'timeago', |
12 | locale: 'en-GB', |
13 | locales: { |
14 | 'en-GB': require('vue-timeago/locales/en-GB.json') |
15 | } |
16 | }) |
17 | import BootstrapVue from 'bootstrap-vue' |
18 | Vue.use(BootstrapVue) |
19 | |
20 | |
21 | // Routing |
22 | import router from './router' |
23 | |
24 | router.beforeEach((to, from, next) => { |
25 | next() |
26 | }) |
27 | |
28 | // Observable stuff |
29 | import Rx from 'rxjs/RX' |
30 | import VueRx from 'vue-rx' |
31 | import { Observable } from 'rxjs/Observable' |
32 | import { Subscription } from 'rxjs/Subscription' // Disposable if using RxJS4 |
33 | Vue.use(VueRx, { |
34 | Observable, |
35 | Subscription |
36 | }) |
37 | |
38 | // Depject API |
39 | import DepjectAPI from './plugins/depject_api' |
40 | Vue.use(DepjectAPI) |
41 | |
42 | // Observable adapters for pull-streams etc |
43 | import SourceObserver from './plugins/source_observer' |
44 | Vue.use(SourceObserver) |
45 | |
46 | import moment from 'moment' |
47 | |
48 | Vue.filter('formatDate', function(value) { |
49 | if (value) { |
50 | return moment(value).format('YYYY/MM/DD hh:mm') |
51 | } |
52 | }) |
53 | |
54 | var vm = new Vue({ // eslint-disable-line no-new |
55 | el: '#app', |
56 | router, |
57 | components: { App }, |
58 | template: '<App/>' |
59 | }) |
60 | window.vm = vm |
61 |
Built with git-ssb-web