From e38248a23906597846c749225fe77d68403df779 Mon Sep 17 00:00:00 2001 From: XLor Date: Tue, 10 Dec 2024 16:56:08 +0800 Subject: [PATCH] feat: moon new create gitignore add .DS_Store (#520) * fix: moon new create gitignore add .DS_Store * chore: format code * chore: format code --- crates/moonbuild/src/new.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crates/moonbuild/src/new.rs b/crates/moonbuild/src/new.rs index 848f416b..392010e4 100644 --- a/crates/moonbuild/src/new.rs +++ b/crates/moonbuild/src/new.rs @@ -181,7 +181,8 @@ fn common( // .gitignore { let gitignore = target_dir.join(".gitignore"); - let content = "target/\n.mooncakes/\n"; + let content = ["target/", ".mooncakes/", ".DS_Store"]; + let content = content.join("\n") + "\n"; let mut file = std::fs::File::create(gitignore).unwrap(); file.write_all(content.as_bytes()).unwrap(); }