parsley/app/javascript/packs/application.js

74 lines
2.3 KiB
JavaScript
Raw Normal View History

2018-03-29 01:57:00 -05:00
import '../styles';
import Vue from 'vue'
2018-04-01 12:17:54 -05:00
import { sync } from 'vuex-router-sync';
2018-04-17 18:38:48 -05:00
import { swInit } from "../lib/ServiceWorker";
2018-04-01 21:43:23 -05:00
import VueProgressBar from "vue-progressbar";
2018-03-29 01:57:00 -05:00
import config from '../config';
import store from '../store';
import router from '../router';
2018-03-30 14:31:09 -05:00
import '../lib/GlobalMixins';
2018-03-29 01:57:00 -05:00
import App from '../components/App';
2018-04-03 20:26:31 -05:00
import AppAutocomplete from "../components/AppAutocomplete";
2018-05-01 10:55:57 -05:00
import AppConfirm from "../components/AppConfirm";
2018-04-03 20:26:31 -05:00
import AppDateTime from "../components/AppDateTime";
2018-04-13 23:32:34 -05:00
import AppDatePicker from "../components/AppDatePicker";
2018-08-28 16:52:56 -05:00
import AppDropdown from "../components/AppDropdown";
2018-09-05 17:49:21 -05:00
import AppExpandTransition from "../components/AppExpandTransition";
2018-04-03 20:26:31 -05:00
import AppIcon from "../components/AppIcon";
import AppModal from "../components/AppModal";
import AppNavbar from "../components/AppNavbar";
import AppPager from "../components/AppPager";
import AppRating from "../components/AppRating";
import AppTagEditor from "../components/AppTagEditor";
2018-04-13 10:25:18 -05:00
import AppTextField from "../components/AppTextField";
2018-06-09 12:36:46 -05:00
import AppValidationErrors from "../components/AppValidationErrors";
2018-04-03 20:26:31 -05:00
Vue.component("AppAutocomplete", AppAutocomplete);
2018-05-01 10:55:57 -05:00
Vue.component("AppConfirm", AppConfirm);
2018-04-03 20:26:31 -05:00
Vue.component("AppDateTime", AppDateTime);
2018-04-13 23:32:34 -05:00
Vue.component("AppDatePicker", AppDatePicker);
2018-08-28 16:52:56 -05:00
Vue.component("AppDropdown", AppDropdown);
2018-09-05 17:49:21 -05:00
Vue.component("AppExpandTransition", AppExpandTransition);
2018-04-03 20:26:31 -05:00
Vue.component("AppIcon", AppIcon);
Vue.component("AppModal", AppModal);
Vue.component("AppNavbar", AppNavbar);
Vue.component("AppPager", AppPager);
Vue.component("AppRating", AppRating);
Vue.component("AppTagEditor", AppTagEditor);
2018-04-13 10:25:18 -05:00
Vue.component("AppTextField", AppTextField);
2018-06-09 12:36:46 -05:00
Vue.component("AppValidationErrors", AppValidationErrors);
2018-04-03 20:26:31 -05:00
2018-04-01 21:43:23 -05:00
Vue.use(VueProgressBar, {
// color: '#bffaf3',
// failedColor: '#874b4b',
// thickness: '5px',
// transition: {
// speed: '0.2s',
// opacity: '0.6s',
// termination: 300
// },
// autoRevert: true,
// location: 'left',
// inverse: false
});
2018-04-01 12:17:54 -05:00
sync(store, router);
2018-04-17 18:38:48 -05:00
swInit(store);
2018-03-29 01:57:00 -05:00
document.addEventListener('DOMContentLoaded', () => {
const app = document.getElementById('app');
config.baseApiUrl = app.dataset.url;
window.$vm = new Vue({
el: '#app',
store,
router,
render: createElement => createElement('App'),
components: { App }
});
});