Tensegritics / ClojureDart

Clojure dialect for Flutter and Dart
1.42k stars 91 forks source link

Generate a better `.gitignore` when initializing a project #148

Closed mynomoto closed 1 year ago

mynomoto commented 2 years ago

I think the current one doesn´t ignore as much as it could. Something like https://github.com/Tensegritics/ClojureDart/commit/83a8381c7741565ab2af97ab735d5e96e9137b2c maybe but less aggressive because people could use flutter/dart dependencies and want their pubspec.yaml.

cgrand commented 2 years ago

Something like?

android/*
ios/*
lib/cljd-out
linux/*
macos/*
test/cljd-out
web/*
windows/*

Not sure about ignoring all the platform/*

mynomoto commented 2 years ago

I think that for simple projects it is safe to remove platform/* but not really sure if there can be custom code there. Mine is currently:

*.class
*.jar
*.log
*.swp
.clj-kondo/**/
.clojuredart/
.cpcache/
.dart_tool/
.lsp/.cache/
.packages
android/
build/
ios/
lib/
linux/
macos/
web/
windows/

It is on the aggressive side since after cloning I need to run clojure -M:cljd init after cloning before I can use clojure -M:cljd flutter

TiLogic commented 2 years ago

Deep linking and many popular packages require modifying platform code, so leaving platform/* out of the .gitignore might be a good idea.

cgrand commented 2 years ago

Going to use this one as a basis https://raw.githubusercontent.com/flutter/flutter/master/.gitignore

grav commented 1 year ago

How about lib/main.dart?

cgrand commented 1 year ago

I pushed (ebef22458ae5d333b2e93b92abe0a92cc33e0978) a very conservative take: just adding Clojure/ClojureDart ignores and not touching anything related to Flutter. The rational being that Flutter .gitignore correctly does its job and we have no clue in further excluding flutter specific stuff.