debian-mirror-gitlab/app/assets/javascripts/blob/notebook/index.js
2023-03-17 16:20:25 +05:30

18 lines
457 B
JavaScript

import Vue from 'vue';
import NotebookViewer from './notebook_viewer.vue';
export default ({ el = document.getElementById('js-notebook-viewer'), relativeRawPath }) => {
return new Vue({
el,
provide: {
relativeRawPath: relativeRawPath || el.dataset.relativeRawPath,
},
render(createElement) {
return createElement(NotebookViewer, {
props: {
endpoint: el.dataset.endpoint,
},
});
},
});
};