diff options
| author | ruki <[email protected]> | 2017-11-06 23:17:48 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2017-11-06 13:46:51 +0800 |
| commit | c3d0714e0524329b1223357d49d792d9cecce29f (patch) | |
| tree | cb8f5cabd20048c0c7d46b6f389049baf285a50a | |
| parent | bde8a5c049af49f9563976ad2e38857e1e965851 (diff) | |
add gitignore when creating new project
25 files changed, 513 insertions, 0 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index ae67b079c..d136ad288 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ ### Changes * Improve support for IDE/editor plugins (.e.g vscode, sublime, intellij-idea) +* Add `.gitignore` file when creating new projects ### Bugs fixed @@ -393,6 +394,7 @@ ### 改进 * 改进对IDE和编辑器插件的集成支持,例如:Visual Studio Code, Sublime Text 以及 IntelliJ IDEA +* 当生成新工程的时候,自动生成一个`.gitignore`文件,忽略一些xmake的临时文件和目录 ### Bugs修复 diff --git a/xmake/actions/config/scanner.lua b/xmake/actions/config/scanner.lua index 0f48d5947..abbb76423 100644 --- a/xmake/actions/config/scanner.lua +++ b/xmake/actions/config/scanner.lua @@ -145,6 +145,11 @@ function make() file:close() end + -- generate .gitignore if not exists + if not os.isfile(".gitignore") then + os.cp("$(programdir)/scripts/gitignore", ".gitignore") + end + -- trace cprint("${bright}xmake.lua generated, scan ok!${clear}${ok_hand}") end diff --git a/xmake/scripts/gitignore b/xmake/scripts/gitignore new file mode 100644 index 000000000..08ffbbd04 --- /dev/null +++ b/xmake/scripts/gitignore @@ -0,0 +1,22 @@ +*.a +*.o +*.exe +*.obj +*.dll +*.lib +*.out +*.suo +*~ +*.swp +*.swo +*.bak +*.orig +*.pdb +*.idb +.svn +.DS_Store +.xmake +*.gch +*.gch.d +gmon.out +build diff --git a/xmake/templates/c++/console/project/.gitignore b/xmake/templates/c++/console/project/.gitignore new file mode 100644 index 000000000..08ffbbd04 --- /dev/null +++ b/xmake/templates/c++/console/project/.gitignore @@ -0,0 +1,22 @@ +*.a +*.o +*.exe +*.obj +*.dll +*.lib +*.out +*.suo +*~ +*.swp +*.swo +*.bak +*.orig +*.pdb +*.idb +.svn +.DS_Store +.xmake +*.gch +*.gch.d +gmon.out +build diff --git a/xmake/templates/c++/console_tbox/project/.gitignore b/xmake/templates/c++/console_tbox/project/.gitignore new file mode 100644 index 000000000..08ffbbd04 --- /dev/null +++ b/xmake/templates/c++/console_tbox/project/.gitignore @@ -0,0 +1,22 @@ +*.a +*.o +*.exe +*.obj +*.dll +*.lib +*.out +*.suo +*~ +*.swp +*.swo +*.bak +*.orig +*.pdb +*.idb +.svn +.DS_Store +.xmake +*.gch +*.gch.d +gmon.out +build diff --git a/xmake/templates/c++/shared_library/project/.gitignore b/xmake/templates/c++/shared_library/project/.gitignore new file mode 100644 index 000000000..08ffbbd04 --- /dev/null +++ b/xmake/templates/c++/shared_library/project/.gitignore @@ -0,0 +1,22 @@ +*.a +*.o +*.exe +*.obj +*.dll +*.lib +*.out +*.suo +*~ +*.swp +*.swo +*.bak +*.orig +*.pdb +*.idb +.svn +.DS_Store +.xmake +*.gch +*.gch.d +gmon.out +build diff --git a/xmake/templates/c++/shared_library_tbox/project/.gitignore b/xmake/templates/c++/shared_library_tbox/project/.gitignore new file mode 100644 index 000000000..08ffbbd04 --- /dev/null +++ b/xmake/templates/c++/shared_library_tbox/project/.gitignore @@ -0,0 +1,22 @@ +*.a +*.o +*.exe +*.obj +*.dll +*.lib +*.out +*.suo +*~ +*.swp +*.swo +*.bak +*.orig +*.pdb +*.idb +.svn +.DS_Store +.xmake +*.gch +*.gch.d +gmon.out +build diff --git a/xmake/templates/c++/static_library/project/.gitignore b/xmake/templates/c++/static_library/project/.gitignore new file mode 100644 index 000000000..08ffbbd04 --- /dev/null +++ b/xmake/templates/c++/static_library/project/.gitignore @@ -0,0 +1,22 @@ +*.a +*.o +*.exe +*.obj +*.dll +*.lib +*.out +*.suo +*~ +*.swp +*.swo +*.bak +*.orig +*.pdb +*.idb +.svn +.DS_Store +.xmake +*.gch +*.gch.d +gmon.out +build diff --git a/xmake/templates/c++/static_library_tbox/project/.gitignore b/xmake/templates/c++/static_library_tbox/project/.gitignore new file mode 100644 index 000000000..08ffbbd04 --- /dev/null +++ b/xmake/templates/c++/static_library_tbox/project/.gitignore @@ -0,0 +1,22 @@ +*.a +*.o +*.exe +*.obj +*.dll +*.lib +*.out +*.suo +*~ +*.swp +*.swo +*.bak +*.orig +*.pdb +*.idb +.svn +.DS_Store +.xmake +*.gch +*.gch.d +gmon.out +build diff --git a/xmake/templates/c/console/project/.gitignore b/xmake/templates/c/console/project/.gitignore new file mode 100644 index 000000000..08ffbbd04 --- /dev/null +++ b/xmake/templates/c/console/project/.gitignore @@ -0,0 +1,22 @@ +*.a +*.o +*.exe +*.obj +*.dll +*.lib +*.out +*.suo +*~ +*.swp +*.swo +*.bak +*.orig +*.pdb +*.idb +.svn +.DS_Store +.xmake +*.gch +*.gch.d +gmon.out +build diff --git a/xmake/templates/c/console_tbox/.gitignore b/xmake/templates/c/console_tbox/.gitignore new file mode 100644 index 000000000..08ffbbd04 --- /dev/null +++ b/xmake/templates/c/console_tbox/.gitignore @@ -0,0 +1,22 @@ +*.a +*.o +*.exe +*.obj +*.dll +*.lib +*.out +*.suo +*~ +*.swp +*.swo +*.bak +*.orig +*.pdb +*.idb +.svn +.DS_Store +.xmake +*.gch +*.gch.d +gmon.out +build diff --git a/xmake/templates/c/shared_library/project/.gitignore b/xmake/templates/c/shared_library/project/.gitignore new file mode 100644 index 000000000..08ffbbd04 --- /dev/null +++ b/xmake/templates/c/shared_library/project/.gitignore @@ -0,0 +1,22 @@ +*.a +*.o +*.exe +*.obj +*.dll +*.lib +*.out +*.suo +*~ +*.swp +*.swo +*.bak +*.orig +*.pdb +*.idb +.svn +.DS_Store +.xmake +*.gch +*.gch.d +gmon.out +build diff --git a/xmake/templates/c/shared_library_tbox/project/.gitignore b/xmake/templates/c/shared_library_tbox/project/.gitignore new file mode 100644 index 000000000..08ffbbd04 --- /dev/null +++ b/xmake/templates/c/shared_library_tbox/project/.gitignore @@ -0,0 +1,22 @@ +*.a +*.o +*.exe +*.obj +*.dll +*.lib +*.out +*.suo +*~ +*.swp +*.swo +*.bak +*.orig +*.pdb +*.idb +.svn +.DS_Store +.xmake +*.gch +*.gch.d +gmon.out +build diff --git a/xmake/templates/c/static_library/project/.gitignore b/xmake/templates/c/static_library/project/.gitignore new file mode 100644 index 000000000..08ffbbd04 --- /dev/null +++ b/xmake/templates/c/static_library/project/.gitignore @@ -0,0 +1,22 @@ +*.a +*.o +*.exe +*.obj +*.dll +*.lib +*.out +*.suo +*~ +*.swp +*.swo +*.bak +*.orig +*.pdb +*.idb +.svn +.DS_Store +.xmake +*.gch +*.gch.d +gmon.out +build diff --git a/xmake/templates/c/static_library_tbox/project/.gitignore b/xmake/templates/c/static_library_tbox/project/.gitignore new file mode 100644 index 000000000..08ffbbd04 --- /dev/null +++ b/xmake/templates/c/static_library_tbox/project/.gitignore @@ -0,0 +1,22 @@ +*.a +*.o +*.exe +*.obj +*.dll +*.lib +*.out +*.suo +*~ +*.swp +*.swo +*.bak +*.orig +*.pdb +*.idb +.svn +.DS_Store +.xmake +*.gch +*.gch.d +gmon.out +build diff --git a/xmake/templates/dlang/console/project/.gitignore b/xmake/templates/dlang/console/project/.gitignore new file mode 100644 index 000000000..08ffbbd04 --- /dev/null +++ b/xmake/templates/dlang/console/project/.gitignore @@ -0,0 +1,22 @@ +*.a +*.o +*.exe +*.obj +*.dll +*.lib +*.out +*.suo +*~ +*.swp +*.swo +*.bak +*.orig +*.pdb +*.idb +.svn +.DS_Store +.xmake +*.gch +*.gch.d +gmon.out +build diff --git a/xmake/templates/dlang/shared_library/project/.gitignore b/xmake/templates/dlang/shared_library/project/.gitignore new file mode 100644 index 000000000..08ffbbd04 --- /dev/null +++ b/xmake/templates/dlang/shared_library/project/.gitignore @@ -0,0 +1,22 @@ +*.a +*.o +*.exe +*.obj +*.dll +*.lib +*.out +*.suo +*~ +*.swp +*.swo +*.bak +*.orig +*.pdb +*.idb +.svn +.DS_Store +.xmake +*.gch +*.gch.d +gmon.out +build diff --git a/xmake/templates/dlang/static_library/project/.gitignore b/xmake/templates/dlang/static_library/project/.gitignore new file mode 100644 index 000000000..08ffbbd04 --- /dev/null +++ b/xmake/templates/dlang/static_library/project/.gitignore @@ -0,0 +1,22 @@ +*.a +*.o +*.exe +*.obj +*.dll +*.lib +*.out +*.suo +*~ +*.swp +*.swo +*.bak +*.orig +*.pdb +*.idb +.svn +.DS_Store +.xmake +*.gch +*.gch.d +gmon.out +build diff --git a/xmake/templates/go/console/project/.gitignore b/xmake/templates/go/console/project/.gitignore new file mode 100644 index 000000000..08ffbbd04 --- /dev/null +++ b/xmake/templates/go/console/project/.gitignore @@ -0,0 +1,22 @@ +*.a +*.o +*.exe +*.obj +*.dll +*.lib +*.out +*.suo +*~ +*.swp +*.swo +*.bak +*.orig +*.pdb +*.idb +.svn +.DS_Store +.xmake +*.gch +*.gch.d +gmon.out +build diff --git a/xmake/templates/go/static_library/project/.gitignore b/xmake/templates/go/static_library/project/.gitignore new file mode 100644 index 000000000..08ffbbd04 --- /dev/null +++ b/xmake/templates/go/static_library/project/.gitignore @@ -0,0 +1,22 @@ +*.a +*.o +*.exe +*.obj +*.dll +*.lib +*.out +*.suo +*~ +*.swp +*.swo +*.bak +*.orig +*.pdb +*.idb +.svn +.DS_Store +.xmake +*.gch +*.gch.d +gmon.out +build diff --git a/xmake/templates/objc++/console/project/.gitignore b/xmake/templates/objc++/console/project/.gitignore new file mode 100644 index 000000000..08ffbbd04 --- /dev/null +++ b/xmake/templates/objc++/console/project/.gitignore @@ -0,0 +1,22 @@ +*.a +*.o +*.exe +*.obj +*.dll +*.lib +*.out +*.suo +*~ +*.swp +*.swo +*.bak +*.orig +*.pdb +*.idb +.svn +.DS_Store +.xmake +*.gch +*.gch.d +gmon.out +build diff --git a/xmake/templates/objc/console/project/.gitignore b/xmake/templates/objc/console/project/.gitignore new file mode 100644 index 000000000..08ffbbd04 --- /dev/null +++ b/xmake/templates/objc/console/project/.gitignore @@ -0,0 +1,22 @@ +*.a +*.o +*.exe +*.obj +*.dll +*.lib +*.out +*.suo +*~ +*.swp +*.swo +*.bak +*.orig +*.pdb +*.idb +.svn +.DS_Store +.xmake +*.gch +*.gch.d +gmon.out +build diff --git a/xmake/templates/rust/console/project/.gitignore b/xmake/templates/rust/console/project/.gitignore new file mode 100644 index 000000000..08ffbbd04 --- /dev/null +++ b/xmake/templates/rust/console/project/.gitignore @@ -0,0 +1,22 @@ +*.a +*.o +*.exe +*.obj +*.dll +*.lib +*.out +*.suo +*~ +*.swp +*.swo +*.bak +*.orig +*.pdb +*.idb +.svn +.DS_Store +.xmake +*.gch +*.gch.d +gmon.out +build diff --git a/xmake/templates/rust/static_library/project/.gitignore b/xmake/templates/rust/static_library/project/.gitignore new file mode 100644 index 000000000..08ffbbd04 --- /dev/null +++ b/xmake/templates/rust/static_library/project/.gitignore @@ -0,0 +1,22 @@ +*.a +*.o +*.exe +*.obj +*.dll +*.lib +*.out +*.suo +*~ +*.swp +*.swo +*.bak +*.orig +*.pdb +*.idb +.svn +.DS_Store +.xmake +*.gch +*.gch.d +gmon.out +build diff --git a/xmake/templates/swift/console/project/.gitignore b/xmake/templates/swift/console/project/.gitignore new file mode 100644 index 000000000..08ffbbd04 --- /dev/null +++ b/xmake/templates/swift/console/project/.gitignore @@ -0,0 +1,22 @@ +*.a +*.o +*.exe +*.obj +*.dll +*.lib +*.out +*.suo +*~ +*.swp +*.swo +*.bak +*.orig +*.pdb +*.idb +.svn +.DS_Store +.xmake +*.gch +*.gch.d +gmon.out +build |
