mirror of
https://github.com/Jerryplusy/rc-plugin.git
synced 2025-10-14 08:09:19 +00:00
🎉初始化仓库
This commit is contained in:
parent
5be9565900
commit
ea89429a1e
21
index.js
Normal file
21
index.js
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
import fs from 'node:fs'
|
||||||
|
import RConfig from './model/index.js'
|
||||||
|
|
||||||
|
const versionData = RConfig.getConfig('version')
|
||||||
|
|
||||||
|
logger.info('--------------------------')
|
||||||
|
logger.info(`RConsole插件${versionData[0].version}初始化~`)
|
||||||
|
logger.info('--------------------------')
|
||||||
|
|
||||||
|
// 读取功能
|
||||||
|
const files = fs
|
||||||
|
.readdirSync('./plugins/RConsole-plugin/apps')
|
||||||
|
.filter((file) => file.endsWith('.js'))
|
||||||
|
|
||||||
|
let apps = {}
|
||||||
|
for (let file of files) {
|
||||||
|
let name = file.replace('.js', '')
|
||||||
|
apps[name] = (await import(`./apps/${file}`))[name]
|
||||||
|
}
|
||||||
|
|
||||||
|
export { apps }
|
Loading…
x
Reference in New Issue
Block a user