mirror of
https://github.com/yoimiya-kokomi/miao-plugin.git
synced 2024-11-16 04:35:42 +00:00
更新model/index.js对path的处理
This commit is contained in:
parent
3557a0d689
commit
f8a5f6c394
@ -1,5 +1,4 @@
|
||||
import fs from 'node:fs'
|
||||
|
||||
import Base from './Base.js'
|
||||
import Character from './Character.js'
|
||||
import Artifact from './Artifact.js'
|
||||
@ -14,21 +13,20 @@ import Weapon from './Weapon.js'
|
||||
import User from './User.js'
|
||||
import MysApi from './MysApi.js'
|
||||
import Button from './Button.js'
|
||||
import { rootPath } from '#miao.path'
|
||||
import { miaoPath } from '#miao.path'
|
||||
|
||||
for (let game of ['gs', 'sr']) {
|
||||
for (let type of ['artifact', 'character', 'material', 'weapon']) {
|
||||
let file = `./plugins/miao-plugin/resources/meta-${game}/${type}/index.js`
|
||||
let file = `${miaoPath}/resources/meta-${game}/${type}/index.js`
|
||||
if (fs.existsSync(file)) {
|
||||
try {
|
||||
await import(`file://${rootPath}/${file}`)
|
||||
await import(`file://${file}`)
|
||||
} catch (e) {
|
||||
console.log(e)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export {
|
||||
Base,
|
||||
Abyss,
|
||||
|
Loading…
Reference in New Issue
Block a user