mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 17: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
@@ -0,0 +1,17 @@
|
||||
const zlib = require('zlib');
|
||||
const fs = require('fs');
|
||||
|
||||
async function install() {
|
||||
if (!global.Hydro) throw new Error('Data missing');
|
||||
if (!fs.existsSync('hydro')) fs.mkdirSync('hydro');
|
||||
const hydro = JSON.parse(zlib.gunzipSync(global.Hydro).toString());
|
||||
fs.writeFileSync('development.js', hydro.app);
|
||||
for (const i in hydro.modules) {
|
||||
fs.writeFileSync(`${i}.hydro`, Buffer.from(hydro.modules[i], 'base64'));
|
||||
}
|
||||
}
|
||||
|
||||
install().catch((e) => {
|
||||
console.error(e);
|
||||
process.exit(1);
|
||||
});
|
||||
Reference in new issue
Block a user