summaryrefslogtreecommitdiff
path: root/xmake/core/project/template.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2019-06-12 00:38:40 +0800
committerruki <[email protected]>2019-06-11 21:52:04 +0800
commit52f3bbe24e365b28f4bcd1e277d178a2561a1e8b (patch)
tree75dbf9dd3ab1636175f9ea0ad230ea9e64b96638 /xmake/core/project/template.lua
parente4043f6851c5de222c27830f42c1134d7397e1cb (diff)
generate template gitignore
Diffstat (limited to 'xmake/core/project/template.lua')
-rw-r--r--xmake/core/project/template.lua5
1 files changed, 4 insertions, 1 deletions
diff --git a/xmake/core/project/template.lua b/xmake/core/project/template.lua
index 8f6e959f1..27dc34e42 100644
--- a/xmake/core/project/template.lua
+++ b/xmake/core/project/template.lua
@@ -280,7 +280,7 @@ function template.create(language, templateid, targetname)
-- append FAQ to xmake.lua
local projectfile = path.join(projectdir, "xmake.lua")
if os.isfile(projectfile) then
- local file = io.open("xmake.lua", "a+")
+ local file = io.open(projectfile, "a+")
if file then
file:print("")
file:print(template.faq())
@@ -288,6 +288,9 @@ function template.create(language, templateid, targetname)
end
end
+ -- generate .gitignore
+ os.cp(path.join(os.programdir(), "scripts", "gitignore"), path.join(projectdir, ".gitignore"))
+
-- ok
return true
end