UNPKG

@opentiny/tiny-toolkit-docs

Version:

这里对你的套件进行简单描述, 比如适用哪些场景,使用了什么技术, 有什么特点

14 lines (11 loc) 389 B
import { $split } from '@/tools/utils'; // 从npm 仓库的位置,引入所有md. 统一用文件名做key const docMDs = {}; const mds = import.meta.globEager('@demos/webdoc/**.md'); for (const path in mds) { if (Object.prototype.hasOwnProperty.call(mds, path)) { const key = $split(path, '/', -1); docMDs[key] = mds[path].default; } } export default docMDs;