2.0.0(preview)

This commit is contained in:
masnn committed 2020-06-08 13:41:43 +08:00
1 parent d5929d78b1
commit 1c8b62a6d9
33 files changed
+307 -241

No files matched your search

+17
View File
@@ -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);
});