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

16 lines
430 B
JavaScript

const files = require.context('./', true, /index.vue$/)
const customDatasetComponents = []
files.keys().forEach(key => {
const title = key.split('/')[1].replace('.vue', '')
const config = require(`./${title}/config.js`).default
customDatasetComponents.push({
title: config.title || title,
vueSysComponentDirName: title,
vueFile: files(key).default,
...config
})
})
export default customDatasetComponents