add: add some info

This commit is contained in:
ray_wuhao 2023-07-05 09:41:04 +08:00
parent cec5166970
commit 028892daa9
3 changed files with 14 additions and 1 deletions

5
.npmignore Normal file
View File

@ -0,0 +1,5 @@
node_modules/
dist/
yarn.lock
yarn-error.log
visualizer.html

View File

@ -85,7 +85,7 @@
"vue-tsc": "^1.0.9"
},
"description": "<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->",
"main": "index.js",
"main": "index.ts",
"repository": {
"type": "git",
"url": "git+https://github.com/XiaoDaiGua-Ray/xiaodaigua-ray.github.io.git"
@ -99,6 +99,9 @@
"admin template",
"中后台模板"
],
"files": [
"**/*"
],
"author": "Ray",
"license": "ISC",
"bugs": {

View File

@ -28,6 +28,11 @@ import type { AppRouteRecordRaw, RouteModules } from '@/router/type'
* @returns 所有路由模块
*
* @remark 自动合并所有路由模块, 每一个 ts 文件都视为一个 route module 与 views 一一对应
*
* 请注意, 如果更改了 modules 的目录位置或者该方法的位置, 需要同步更改 import.meta.glob 方法的路径
* 该方法会以本文件为起始位置去查找对应 URL 目录的资源
*
* 会将 modules 中每一个 ts 文件当作一个路由模块, 即使你以分包的形式创建了路由模块
*/
export const combineRawRouteModules = () => {
const modulesFiles: RouteModules = import.meta.glob('../modules/**/*.ts', {