git ssb

3+

dangerousbeans / scuttle-vue



Tree: 24407748211492167d2e4dbb085864747d36783a

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
4import Vue from 'vue'
5import App from './App.vue'
6import Public from './components/Public.vue'
7
8// Vue extensions
9import VueTimeago from 'vue-timeago'
10Vue.use(VueTimeago, {
11 name: 'timeago',
12 locale: 'en-GB',
13 locales: {
14 'en-GB': require('vue-timeago/locales/en-GB.json')
15 }
16})
17import BootstrapVue from 'bootstrap-vue'
18Vue.use(BootstrapVue)
19
20
21// Routing
22import router from './router'
23
24router.beforeEach((to, from, next) => {
25 next()
26})
27
28// Observable stuff
29import Rx from 'rxjs/RX'
30import VueRx from 'vue-rx'
31import { Observable } from 'rxjs/Observable'
32import { Subscription } from 'rxjs/Subscription' // Disposable if using RxJS4
33Vue.use(VueRx, {
34 Observable,
35 Subscription
36})
37
38// Depject API
39import DepjectAPI from './plugins/depject_api'
40Vue.use(DepjectAPI)
41
42// Observable adapters for pull-streams etc
43import SourceObserver from './plugins/source_observer'
44Vue.use(SourceObserver)
45
46import moment from 'moment'
47
48Vue.filter('formatDate', function(value) {
49 if (value) {
50 return moment(value).format('YYYY/MM/DD hh:mm')
51 }
52})
53
54var vm = new Vue({ // eslint-disable-line no-new
55 el: '#app',
56 router,
57 components: { App },
58 template: '<App/>'
59})
60window.vm = vm
61

Built with git-ssb-web