cc-haxe/minify.js
2022-02-19 21:48:34 +01:00

11 lines
278 B
JavaScript

const fs = require("fs");
const luamin = require("luamin");
const haxeOutput = fs.readFileSync("build/Haxe.lua",{encoding:"utf8"});
const minified = luamin.minify(haxeOutput);
fs.writeFileSync(process.argv[2] ?? "build/Haxe.min.lua",minified);
console.log("minified lua");