2020-03-04 09:08:20 +00:00
|
|
|
import Vue from 'vue';
|
2021-03-23 18:09:05 +00:00
|
|
|
import VueApollo from 'vue-apollo';
|
|
|
|
import createDefaultClient from '~/lib/graphql';
|
2020-03-04 09:08:20 +00:00
|
|
|
import ReleaseShowApp from './components/app_show.vue';
|
|
|
|
|
2021-03-23 18:09:05 +00:00
|
|
|
Vue.use(VueApollo);
|
|
|
|
|
|
|
|
const apolloProvider = new VueApollo({
|
2021-11-01 12:11:46 +00:00
|
|
|
defaultClient: createDefaultClient(),
|
2021-03-23 18:09:05 +00:00
|
|
|
});
|
2020-09-17 18:10:12 +00:00
|
|
|
|
2020-03-04 09:08:20 +00:00
|
|
|
export default () => {
|
|
|
|
const el = document.getElementById('js-show-release-page');
|
|
|
|
|
2021-03-23 18:09:05 +00:00
|
|
|
if (!el) return false;
|
|
|
|
|
|
|
|
const { projectPath, tagName } = el.dataset;
|
2020-03-04 09:08:20 +00:00
|
|
|
|
|
|
|
return new Vue({
|
|
|
|
el,
|
2021-03-23 18:09:05 +00:00
|
|
|
apolloProvider,
|
|
|
|
provide: {
|
|
|
|
fullPath: projectPath,
|
|
|
|
tagName,
|
|
|
|
},
|
2020-12-24 00:10:25 +00:00
|
|
|
render: (h) => h(ReleaseShowApp),
|
2020-03-04 09:08:20 +00:00
|
|
|
});
|
|
|
|
};
|