Add common files to generated .gitignore

This commit is contained in:
Stefan Schindler 2017-07-26 00:49:59 +02:00
parent 55e7e82e5c
commit f1ea0a67df
1 changed files with 7 additions and 0 deletions

View File

@ -221,7 +221,14 @@ impl MDBook {
debug!("[*]: Writing to .gitignore");
// Write the destination folder to file
writeln!(f, "{}", relative).expect("Could not write to file.");
// Add common files
let ignores = vec!("*~", ".DS_Store");
for pattern in ignores {
writeln!(f, "{}", pattern).expect("Could not write to file.");
}
}
}