mirror of
https://github.com/Adorable-Catgirl/LuaComp.git
synced 2025-04-12 22:58:18 +10:00
Make LuaComp actually use argparse instead of trying to call a nil function
add_complete() doesn't seem to exist in argparse anymore so I commented it out
This commit is contained in:
parent
062f7544d5
commit
832798a3a5
@ -15,6 +15,7 @@ end
|
|||||||
--#include "src/directive_provider.lua"
|
--#include "src/directive_provider.lua"
|
||||||
--#include "src/cfg/minifier_providers.lua"
|
--#include "src/cfg/minifier_providers.lua"
|
||||||
|
|
||||||
|
local argparse = require("argparse")
|
||||||
local parser = argparse(arg[0], "LuaComp v"..LUACOMP_VERSION.."\nA preprocessor+postprocessor written in Lua.")
|
local parser = argparse(arg[0], "LuaComp v"..LUACOMP_VERSION.."\nA preprocessor+postprocessor written in Lua.")
|
||||||
parser:argument("input", "Input file (- for STDIN)")
|
parser:argument("input", "Input file (- for STDIN)")
|
||||||
parser:option("-O --output", "Output file. (- for STDOUT)", "-")
|
parser:option("-O --output", "Output file. (- for STDOUT)", "-")
|
||||||
@ -46,7 +47,7 @@ parser:flag("-v --version", "Prints the version and exits"):action(function()
|
|||||||
print(LUACOMP_VERSION)
|
print(LUACOMP_VERSION)
|
||||||
os.exit(0)
|
os.exit(0)
|
||||||
end)
|
end)
|
||||||
parser:add_complete()
|
-- parser:add_complete()
|
||||||
local args = parser:parse()
|
local args = parser:parse()
|
||||||
local file = args.input
|
local file = args.input
|
||||||
_sv("LUACOMP_MINIFIER", args.minifier)
|
_sv("LUACOMP_MINIFIER", args.minifier)
|
||||||
|
Loading…
Reference in New Issue
Block a user