added seperate input and working on http / sockets

This commit is contained in:
2026-05-27 17:01:26 -04:00
parent 59e09a5995
commit f7b64c11b7
43 changed files with 5035 additions and 533 deletions

View File

@@ -0,0 +1,29 @@
local function usageError()
print(
"\nusage: minify <file> or unminify <file>\n" ..
" The modified code will be printed to the stdout, pipe it to a file,\n" ..
" or something else as desired EG:\n\n" ..
" minify minify input.lua > output.lua\n\n" ..
" * minify will minify the code in the file.\n" ..
" * unminify will beautify the code and replace the variable names with easily\n" ..
" find-replacable ones to aide in reverse engineering minified code.\n")
syscall.exit(0)
end
local args = {...}
if #args ~= 2 then
usageError()
end
local minify = require("minify")
local fs = require("fs")
if args[1] == 'minify' then
print(minify.minify(fs.readAllText(args[2])))
elseif args[1] == 'unminify' then
print(minify.beautify(fs.readAllText(args[2])))
else
usageError()
end

File diff suppressed because it is too large Load Diff