debian-mirror-gitlab/app/assets/javascripts/blob/notebook/index.js

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

19 lines
457 B
JavaScript
Raw Normal View History

2017-08-17 22:00:37 +05:30
import Vue from 'vue';
2020-04-08 14:13:33 +05:30
import NotebookViewer from './notebook_viewer.vue';
2017-08-17 22:00:37 +05:30
2023-03-17 16:20:25 +05:30
export default ({ el = document.getElementById('js-notebook-viewer'), relativeRawPath }) => {
2020-04-08 14:13:33 +05:30
return new Vue({
2017-08-17 22:00:37 +05:30
el,
2021-11-11 11:23:49 +05:30
provide: {
2023-03-17 16:20:25 +05:30
relativeRawPath: relativeRawPath || el.dataset.relativeRawPath,
2021-11-11 11:23:49 +05:30
},
2020-04-08 14:13:33 +05:30
render(createElement) {
return createElement(NotebookViewer, {
props: {
endpoint: el.dataset.endpoint,
},
});
2018-03-17 18:26:18 +05:30
},
2017-08-17 22:00:37 +05:30
});
};