diff options
Diffstat (limited to 'xmake/core/project/template.lua')
| -rw-r--r-- | xmake/core/project/template.lua | 5 |
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 |
