mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 17:38:19 +08:00
完善设置
This commit is contained in:
1 parent
fc0d9873a2
commit
7edb29d7b8
43 files changed
+219
-184
No files matched your search
+7
-4
@@ -25,12 +25,15 @@ try {
|
||||
// eslint-disable-next-line import/no-unresolved
|
||||
const f = require('../.build/module.json');
|
||||
for (const filename in f) {
|
||||
const m = { ...yaml.safeLoad(zlib.gunzipSync(f[filename])), filename, isBuiltin: true };
|
||||
const m = {
|
||||
...yaml.safeLoad(zlib.gunzipSync(Buffer.from(f[filename], 'base64'))),
|
||||
filename,
|
||||
isBuiltin: true,
|
||||
};
|
||||
pending.push(m);
|
||||
console.log(filename);
|
||||
}
|
||||
} catch (e) {
|
||||
// Builtin module is in the module directory
|
||||
console.log(e);
|
||||
}
|
||||
|
||||
async function preload() {
|
||||
@@ -225,7 +228,7 @@ async function load() {
|
||||
});
|
||||
const builtinLib = [
|
||||
'axios', 'download', 'i18n', 'mail', 'markdown',
|
||||
'md5', 'misc', 'paginate', 'pwhash', 'rank',
|
||||
'md5', 'misc', 'paginate', 'hash.hydro', 'rank',
|
||||
'template', 'validator', 'nav',
|
||||
];
|
||||
for (const i of builtinLib) require(`./lib/${i}`);
|
||||
|
||||
Reference in new issue
Block a user