aboutsummaryrefslogtreecommitdiff
path: root/src/minify.lua
blob: 6664dacf15d22ff6a5cc86a1bad0bafd572fe394 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
local glum = require("glum")
local glumu = require("glum.uglify")
local filename = ...
local file = assert(io.open(filename,"r"))
local filedata = file:read("*a")
file:close()
local a = glum.minify(filedata,filename)
local b = glumu.uglify(a)
if string.len(a) < string.len(b) then
	print(a)
else
	print(b)
end