1
0
mirror of https://github.com/tobspr/shapez.io.git synced 2025-12-09 16:21:51 +00:00
tobspr_shapez.io/gulp/loader.compressjson.cjs
EmeraldBlock 24ceb6664d ES modules and config refactor
- switches to ES modules in gulp and src
- uses dengr's webpack configs and package.json, with modifications
- removes gulp/package.json
- removes babel stuff
- removes gulp-load-plugins, instead importing gulp plugins manually
- removes unused and trivial packages
- upgrades packages
- uses path/posix, for gulp
- removes __dirname in favor of relative urls
2023-03-04 00:46:55 -06:00

12 lines
344 B
JavaScript

"use strict";
const lzString = require("lz-string");
module.exports = function (source) {
const compressed = lzString.compressToEncodedURIComponent(source);
const sourcecode = `module.exports = (function() {
return JSON.parse(require("global-compression").decompressX64("${compressed}"));
})()`;
return sourcecode;
};