mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
2.0.0(preview)
This commit is contained in:
1 parent
d5929d78b1
commit
1c8b62a6d9
33 files changed
+307
-241
No files matched your search
@@ -67,8 +67,14 @@ async function build(type) {
|
||||
}
|
||||
}
|
||||
const f = fs.readFileSync(root('.build/development.js')).toString();
|
||||
const installer = fs.readFileSync(root('tool/install.js')).toString();
|
||||
const file = `global._hydroModule=${JSON.stringify(j)};${f}`;
|
||||
fs.writeFileSync(root('.build/full.js'), file);
|
||||
const hydro = {};
|
||||
hydro.app = Buffer.from(f).toString('base64');
|
||||
hydro.modules = j;
|
||||
const d = zlib.gzipSync(Buffer.from(JSON.stringify(hydro)), { level: -1 }).toString('base64');
|
||||
fs.writeFileSync(root('.build/install.js'), `global.Hydro="${d}"; ${installer}`);
|
||||
}
|
||||
|
||||
module.exports = build;
|
||||
|
||||
Reference in new issue
Block a user