Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: generate default gitignore file with tempura init #39

Merged
merged 1 commit into from
Oct 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions resources/gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# gitignore generated by tempura
/public/
# end of tempura gitignore
4 changes: 4 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,10 @@ pub fn init(project_root: &Path) -> io::Result<()> {
fs::write(&config_file, config_json)?;
info!("setup project config file: {}", config_file.display());

let gitignore = project_root.join(".gitignore");
fs::write(&gitignore, include_str!("../resources/gitignore"))?;
info!("setup .gitignore file: {}", gitignore.display());

info!("setup done.");

Ok(())
Expand Down
Loading