gitignore icon indicating copy to clipboard operation
gitignore copied to clipboard

Create Deno.gitignore

Open turnipjs opened this issue 3 years ago • 6 comments

This is a good file to include for those that are choosing to use the Deno framework for new projects. I believe that the Deno project is used enough to warrant an addition to Github's library of preconfigured .gitignore files.

The contents of the provided file is a direct copy of the .gitignore file provided by the project's own repository. The file I copied is located here: https://github.com/denoland/deno/blob/main/.gitignore.

I am not affiliated with the Deno project.

To learn more about the Deno project, please visit https://deno.land.

An explanation for the ignored files not mentioned in the comments directly in the file:

*.orig # Generally used as a backup when making changes to a file to compare with the original. These can clutter up a repository when they are left as a future reference.
*.pyc # A compiled python script
*.swp # A swap file created by the Vi editor and it's derivatives
.env # A file containing environment variables. Committing this file to a repository can pose a major security risk.

/.cargo_home/ # A directory used by Cargo: https://github.com/rust-lang/cargo#compiling-from-source
/.idea/ # A configuration directory used by JetBrains programs.
/.vscode/ # A configuration directory used by Visual Studio Code
gclient_config.py_entries # I'm not entirely sure what this is beyond that it is related to gclient, see: https://chromium.googlesource.com/chromium/tools/depot_tools.git/+/HEAD/README.gclient.md. If you know more, please feel free to submit a PR with an explanation replacing this comment.
/gh-pages/ # A directory used by Github Pages
/target/ # Often used as an output folder when compiling, building, transpiling, etc. code.
/std/hash/_wasm/target # I assume this is a target folder when compiling web assembly. If you know, please feel free to submit a PR with an explanation replacing this comment.
/tools/wpt/manifest.json # Manifest file for web-platform-tests.

Please see the file in the PR for explanations of the rest of the included rules.

turnipjs avatar Jul 02 '22 17:07 turnipjs

I have some ideas.

Add /.deno/

In some cases, a .deno dir is created.

Remove /.vscode/

Most .gitignores in this repo don't have /.vscode/ dir.

nakasyou avatar Apr 15 '23 02:04 nakasyou

Add /.deno/

In some cases, a .deno dir is created.

Not sure what is contained in this directory. It may be something that should be committed but I have not found any documentation explaining what is contained in it. (Why is searching for terms with special characters so hard in 2023‽) Would you mind telling me what is contained in this directory or pointing me to some documentation?

They also updated the .gitignore file in the Deno repository.

Additionally, there are some parts of the Deno-made gitignore that shouldn't be in it like the VSC directory you mentioned as well as JetBrains stuff and Mac stuff.

Not sure why *.pyc is in the file but I figure there is some reason so I'm leaving it for now.

I will be making a new PR with those updates as well once I figure out if /.deno/ should be ignored.

turnipjs avatar Apr 17 '23 17:04 turnipjs

Not sure what is contained in this directory. It may be something that should be committed but I have not found any documentation explaining what is contained in it. (Why is searching for terms with special characters so hard in 2023‽) Would you mind telling me what is contained in this directory or pointing me to some documentation?

I'm sorry. I told you the wrong thing. It seems that the /.deno/ directory is only when working with Replit. It is not official.

nakasyou avatar Apr 25 '23 11:04 nakasyou

Almost all of these are completely unnecessary. The only one which serves some purpose (and isn't editor-specific) is .env:

*.orig # Editor specific
*.pyc # Python-related? Deno doesn't have anything to do with python.
*.swp # Editor specific
.env # Useful

/.cargo_home/ # Rust-related. Deno doesn't have anything to do with rust outside of being written in rust.
/.idea/ # Editor specific
/.vscode/ # Editor specific
gclient_config.py_entries # tool specific
/gh-pages/ # tool specific
/target/ # Rust-related
/std/hash/_wasm/target # Rust-related again, in this case this seems to be copied from the standard library and is not useful for average user projects
/tools/wpt/manifest.json # WPT-related, not useful for average user projects

lino-levan avatar Oct 01 '23 18:10 lino-levan