gleam-lang / gleam

⭐️ A friendly language for building type-safe, scalable systems!
https://gleam.run
Apache License 2.0
16.51k stars 691 forks source link

`gleam new` overwrites `.gitignore`. #2685

Closed computerscience-person closed 3 months ago

computerscience-person commented 3 months ago

I'm using gleam for the first time inside NixOS with devenv, and devenv scaffolds the project directory with its own .gitignore. However, when using gleam new in a directory with an existing .gitignore, it needs to delete the old .gitignore, or the command just fails. Should this be the behavior of gleam new? Or should I just scaffold the project manually? If so, is there a guide as to doing the scaffolding manually?

lpil commented 3 months ago

Hello! That's the intended behaviour of gleam new, yes. If you want to make a Gleam project manually then you can make this gleam.toml.

name = "app"
version = "1.0.0"

[dependencies]
gleam_stdlib = "~> 0.34 or ~> 1.0"

[dev-dependencies]

The documentation for this can be found here: https://gleam.run/writing-gleam/gleam-toml/

salif commented 3 months ago

@lpil - In my opinion, if a .gitignore file already exists, then gleam new should append to the file, not overwrite it