You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

code-frequency.js 791B

123456789101112131415161718192021
  1. import {createApp} from 'vue';
  2. export async function initRepoCodeFrequency() {
  3. const el = document.getElementById('repo-code-frequency-chart');
  4. if (!el) return;
  5. const {default: RepoCodeFrequency} = await import(/* webpackChunkName: "code-frequency-graph" */'../components/RepoCodeFrequency.vue');
  6. try {
  7. const View = createApp(RepoCodeFrequency, {
  8. locale: {
  9. loadingTitle: el.getAttribute('data-locale-loading-title'),
  10. loadingTitleFailed: el.getAttribute('data-locale-loading-title-failed'),
  11. loadingInfo: el.getAttribute('data-locale-loading-info'),
  12. },
  13. });
  14. View.mount(el);
  15. } catch (err) {
  16. console.error('RepoCodeFrequency failed to load', err);
  17. el.textContent = el.getAttribute('data-locale-component-failed-to-load');
  18. }
  19. }