debian-mirror-gitlab/app/assets/javascripts/releases/mount_show.js
2021-11-18 22:05:49 +05:30

33 lines
650 B
JavaScript

import Vue from 'vue';
import VueApollo from 'vue-apollo';
import createDefaultClient from '~/lib/graphql';
import ReleaseShowApp from './components/app_show.vue';
Vue.use(VueApollo);
const apolloProvider = new VueApollo({
defaultClient: createDefaultClient(
{},
{
assumeImmutableResults: true,
},
),
});
export default () => {
const el = document.getElementById('js-show-release-page');
if (!el) return false;
const { projectPath, tagName } = el.dataset;
return new Vue({
el,
apolloProvider,
provide: {
fullPath: projectPath,
tagName,
},
render: (h) => h(ReleaseShowApp),
});
};