Welcome to mirror list, hosted at ThFree Co, Russian Federation.

run_modules.js « javascripts « assets « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: fabdff9bb76048ef1fbb6de56b0f0f082f4f5941 (plain)
1
2
3
4
5
6
7
8
9
export const runModules = (modules, prefix) => {
  document
    .querySelector('meta[name="controller-path"]')
    .content.split('/')
    .forEach((part, index, arr) => {
      const path = `${prefix}${[...arr.slice(0, index), part].join('/')}/index.js`;
      modules[path]?.();
    });
};