squishy

1
-- Set this option, same as if user specified
2
-- '--executable' on the command-line. Can be 
3
-- disabled by user with '--no-executable'
4
Option "executable" "/usr/bin/lua5.2"
5
 
6
-- Output filename
7
Output "squish"
8
 
9
-- This is normal/main script
10
Main "squish.lua"
11
 
12
-- Add minify extension if asked to
13
if GetOption "with-minify" then
14
	Module "optlex"		"minify/optlex.lua"
15
	Module "optparser"	"minify/optparser.lua"
16
	Module "llex"		"minify/llex.lua"
17
	Module "lparser"	"minify/lparser.lua"
18
 
19
	Main "minify/squish.minify.lua"
20
end
21
 
22
-- Compress Lua scripts (an excellent hack :) )
23
if GetOption "with-uglify" then
24
	Module "llex"		"uglify/llex.lua"
25
	
26
	Main "uglify/squish.uglify.lua"
27
end
28
 
29
-- Compile output files to Lua bytecode
30
if GetOption "with-compile" then
31
	Module "minichunkspy" "compile/minichunkspy.lua"
32
	Main "compile/squish.compile.lua"
33
end
34
 
35
if GetOption "with-virtual-io" then
36
	Resource "vio" "vio/vio.lua"
37
end
38
 
39
if GetOption "with-gzip" then
40
	Resource "gunzip.lua" "gunzip.lua"
41
	Main "gzip/squish.gzip.lua"
42
end
43
 
44
if GetOption "with-debug" then
45
	Resource "squish.debug" "squish.debug"
46
end