mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
Merge branch 'master' of https://github.com/hydro-dev/Hydro
This commit is contained in:
commit
fc0d9873a2
30 files changed
+309
-138
No files matched your search
+3
-10
@@ -39,10 +39,7 @@ const build = async (type) => {
|
||||
}
|
||||
for (const j of prepare) {
|
||||
if (exist(`module/${i}/${j}.js`)) {
|
||||
const file = fs.readFileSync(root(`module/${i}/${j}.js`));
|
||||
if (file.includes('require')) {
|
||||
config.entry[`${i}/${j}`] = root(`module/${i}/${j}.js`);
|
||||
}
|
||||
config.entry[`${i}/${j}`] = root(`module/${i}/${j}.js`);
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
@@ -70,12 +67,7 @@ const build = async (type) => {
|
||||
const current = {};
|
||||
for (const j of prepare) {
|
||||
if (exist(`module/${i}/${j}.js`)) {
|
||||
const file = fs.readFileSync(root(`module/${i}/${j}.js`));
|
||||
if (file.includes('require')) {
|
||||
current[j] = fs.readFileSync(root(`.build/module/${i}/${j}.js`)).toString();
|
||||
} else {
|
||||
current[j] = fs.readFileSync(root(`module/${i}/${j}.js`)).toString();
|
||||
}
|
||||
current[j] = fs.readFileSync(root(`.build/module/${i}/${j}.js`)).toString();
|
||||
}
|
||||
}
|
||||
if (exist(`module/${i}/locale`)) {
|
||||
@@ -101,6 +93,7 @@ const build = async (type) => {
|
||||
current.description = m.description || '';
|
||||
current.requirements = m.requirements || [];
|
||||
current.version = m.version || 'unknown';
|
||||
current.id = m.id;
|
||||
if (m.os) current.os = m.os;
|
||||
const data = zlib.gzipSync(Buffer.from(yaml.safeDump(current)), { level: -1 });
|
||||
fs.writeFileSync(root(`.build/module/${i}.hydro`), data);
|
||||
|
||||
@@ -33,6 +33,7 @@ async function build(type) {
|
||||
'bsod.html',
|
||||
];
|
||||
const builtin = {
|
||||
id: 'builtin',
|
||||
locale: lang,
|
||||
template: template('templates', exclude),
|
||||
file: {},
|
||||
|
||||
Reference in new issue
Block a user