squishy

Mon, 27 Jul 2009 03:59:39 +0100

author
Matthew Wild <mwild1@gmail.com>
date
Mon, 27 Jul 2009 03:59:39 +0100
changeset 37
cb8b48b08e1e
parent 34
0e34461ab2a6
child 45
69b3487c71cc
permissions
-rw-r--r--

Only add a module to the list once, no matter how many times it is added in the squishy file


-- Set this option, same as if user specified
-- '--executable' on the command-line. Can be 
-- disabled by user with '--no-executable'
Option "executable"

-- Output filename
Output "squish"

-- This is normal/main script
Main "squish.lua"

-- Add minify extension if asked to
if GetOption "with-minify" then
	Module "optlex"		"minify/optlex.lua"
	Module "optparser"	"minify/optparser.lua"
	Module "llex"		"minify/llex.lua"
	Module "lparser"	"minify/lparser.lua"

	Main "minify/squish.minify.lua"
end

-- Compress Lua scripts (an excellent hack :) )
if GetOption "with-uglify" then
	Module "llex"		"uglify/llex.lua"
	
	Main "uglify/squish.uglify.lua"
end

-- Compile output files to Lua bytecode
if GetOption "with-compile" then
	Main "compile/squish.compile.lua"
end

if GetOption "with-virtual-io" then
	Resource "vio" "vio/vio.lua"
end

if GetOption "with-debug" then
	Resource "squish.debug" "squish.debug"
end

mercurial