summaryrefslogtreecommitdiff
path: root/src/dev/new.rs
diff options
context:
space:
mode:
authormo8it <mo8it@proton.me>2024-04-25 15:34:58 +0200
committermo8it <mo8it@proton.me>2024-04-25 15:34:58 +0200
commit212c82c6f6a0356ed6b292ddc48a8444e8e9dbf2 (patch)
tree7aa889e950ee833177e82d80b142e2baba2825e1 /src/dev/new.rs
parentfcefa3d6144028a77ed381ddaabcf004a02c804c (diff)
Don't ignore .vscode/extensions.json when developing third-party exercises
Diffstat (limited to 'src/dev/new.rs')
-rw-r--r--src/dev/new.rs9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/dev/new.rs b/src/dev/new.rs
index c5a0bd2..44487ab 100644
--- a/src/dev/new.rs
+++ b/src/dev/new.rs
@@ -45,7 +45,7 @@ pub fn new(path: &Path, no_git: bool) -> Result<()> {
bail!("`git init` didn't run successfully. See the error message above");
}
- write_rel_file(".gitignore", &dir_name, crate::init::GITIGNORE)?;
+ write_rel_file(".gitignore", &dir_name, GITIGNORE)?;
create_rel_dir("exercises", &dir_name)?;
create_rel_dir("solutions", &dir_name)?;
@@ -72,6 +72,13 @@ pub fn new(path: &Path, no_git: bool) -> Result<()> {
Ok(())
}
+pub const GITIGNORE: &[u8] = b".rustlings-state.txt
+Cargo.lock
+target
+.vscode
+!.vscode/extensions.json
+";
+
const INFO_FILE_BEFORE_FORMAT_VERSION: &str =
"# The format version is an indicator of the compatibility of third-party exercises with the
# Rustlings program.