aboutsummaryrefslogtreecommitdiff
path: root/nomsu_environment.moon
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2018-11-26 16:16:08 -0800
committerBruce Hill <bruce@bruce-hill.com>2018-11-26 16:17:07 -0800
commitcbbe6b1c14faf85c20dee4c481723cf0e468e0e8 (patch)
tree2906c14f9f054bd68e2c9a56a87a8d346f647d08 /nomsu_environment.moon
parent1a794c64871fa044c3024a7771ee4123e800d3b2 (diff)
Updated and fixed the command line API. Introduced the "-t tool" flag
for more concisely running tools, removed the "-I file" and replaced it with "-m files..."
Diffstat (limited to 'nomsu_environment.moon')
-rw-r--r--nomsu_environment.moon5
1 files changed, 3 insertions, 2 deletions
diff --git a/nomsu_environment.moon b/nomsu_environment.moon
index add852a..5d26701 100644
--- a/nomsu_environment.moon
+++ b/nomsu_environment.moon
@@ -172,13 +172,14 @@ nomsu_environment = Importer{
did_anything = false
for nomsupath in package.nomsupath\gmatch("[^;]+")
- files = Files.list(nomsupath.."/"..path)
+ full_path = nomsupath == "." and path or nomsupath.."/"..path
+ files = Files.list(full_path)
continue unless files
for filename in *files
- continue unless filename == "stdin" or filename\match("%.nom$")
lua_filename = filename\gsub("%.nom$", ".lua")
-- TODO: don't automatically use precompiled version?
code = if optimization != 0 and Files.read(lua_filename)
+ -- TODO: use a checksum?
file = Files.read(lua_filename)
LuaCode\from(Source(filename, 1, #file), file)
else