summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/contributors/index.js
blob: b6063589734f39f8eb766993a8ce4122875ed50e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import Vue from 'vue';
import ContributorsGraphs from './components/contributors.vue';
import store from './stores';

export default () => {
  const el = document.querySelector('.js-contributors-graph');

  if (!el) return null;

  return new Vue({
    el,
    store,

    render(createElement) {
      return createElement(ContributorsGraphs, {
        props: {
          endpoint: el.dataset.projectGraphPath,
          branch: el.dataset.projectBranch,
        },
      });
    },
  });
};