-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathindex.js
More file actions
30 lines (28 loc) · 1.25 KB
/
Copy pathindex.js
File metadata and controls
30 lines (28 loc) · 1.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import chalk from 'chalk';
import Config from './utils/config.js';
import path__default from 'path';
import { _paths } from './utils/paths.js';
import YukiBili from './apps/bilibili.js';
import YukiHelp from './apps/help.js';
import YukiVersion from './apps/version.js';
import YukiWeibo from './apps/weibo.js';
const yukiPluginVersion = Config.getPackageJsonKey('version', path__default.join(_paths.pluginPath, 'package.json'));
let apps = { YukiBili, YukiHelp, YukiVersion, YukiWeibo };
let rules = {};
let count = 0;
for (let key in apps) {
if (!apps[key]) {
logger.error(`载入插件错误:${[key]}`);
continue;
}
rules[`${key}`] = apps[key];
count++;
}
logger.info(chalk.rgb(0, 190, 255)(`-----------------------------------------`));
logger.info(chalk.rgb(255, 225, 255)(`|优纪插件 ${yukiPluginVersion} 初始化~`));
logger.info(chalk.rgb(255, 245, 255)(`|作者:snowtafir`));
logger.info(chalk.rgb(255, 225, 255)(`|仓库地址:`));
logger.info(chalk.rgb(255, 245, 255)(`|https://github.com/snowtafir/yuki-plugin`));
logger.info(chalk.rgb(0, 190, 255)(`-----------------------------------------`));
logger.info(chalk.rgb(0, 190, 255)(`★ 优纪插件加载完成,共计加载${count}个app`));
export { rules as apps };