diff options
| author | ruki <[email protected]> | 2026-02-28 22:54:03 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2026-02-28 22:54:03 +0800 |
| commit | cfa0f9320bf323a42921ac7238202aa33f732006 (patch) | |
| tree | bcf27872aa00e0a8f386d49e0849c6fe8b6eb7b7 | |
| parent | 4fbe56bd57314a16707458ba3c684ba4f8fdae1c (diff) | |
improve comments
| -rw-r--r-- | xmake/actions/create/template.lua | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/xmake/actions/create/template.lua b/xmake/actions/create/template.lua index a983b89c6..d097456d8 100644 --- a/xmake/actions/create/template.lua +++ b/xmake/actions/create/template.lua @@ -18,9 +18,11 @@ -- @file template.lua -- +-- imports import("core.base.global") import("core.base.hashset") +-- some builtin template variables in xmake.lua function builtinvars(targetname) return {TARGETNAME = targetname, FAQ = function() return io.readfile(path.join(os.programdir(), "scripts", "faq.lua")) end} @@ -34,7 +36,7 @@ function rootdirs() table.insert(results, dir) end dir = path.join(os.programdir(), "templates") - if os.isdir(dir) and not table.contains(results, dir) then + if os.isdir(dir) then table.insert(results, dir) end return results |
