diff --git a/assets/default-icon.png b/assets/default-icon.png new file mode 100644 index 0000000..bbe0c7a Binary files /dev/null and b/assets/default-icon.png differ diff --git a/src/subcommands/init.rs b/src/subcommands/init.rs index a25fb6a..752472f 100644 --- a/src/subcommands/init.rs +++ b/src/subcommands/init.rs @@ -33,6 +33,9 @@ pub fn init( // Create the .gitignore file create_gitignore(path, verbose)?; + // Create the pack.png file + create_pack_png(path, verbose)?; + // Create the src directory let src_path = path.join("src"); create_dir(&src_path, verbose)?; @@ -101,3 +104,15 @@ fn create_gitignore(path: &Path, verbose: bool) -> std::io::Result<()> { } Ok(()) } + +fn create_pack_png(path: &Path, verbose: bool) -> std::io::Result<()> { + let pack_png = path.join("pack.png"); + fs::write(&pack_png, include_bytes!("../../assets/default-icon.png"))?; + if verbose { + print_info(&format!( + "Created pack.png file at {}.", + to_absolute_path(&pack_png)? + )); + } + Ok(()) +}