I created a new app and the Dart Editor (M4) created a slew of files and folders. Now I'm not sure which I can safely put in the gitignore. Here's the tree:
app/.buildlog
app/build.dart
app/packages/analyzer_experimental
app/packages/args
app/packages/browser
app/packages/csslib
app/packages/html5lib
app/packages/js
app/packages/logging
app/packages/meta
app/packages/pathos
app/packages/source_maps
app/packages/unittest
app/packages/web_ui
app/pubspec.lock
app/pubspec.yaml
app/web/app.css
app/web/app.dart
app/web/app.html
app/web/out/app.css
app/web/out/app.dart
app/web/out/app.dart.map
app/web/out/app.html
app/web/out/app.html_bootstrap.dart
app/web/out/packages
app/web/out/xclickcounter.dart
app/web/out/xclickcounter.dart.map
app/web/packages
app/web/xclickcounter.dart
app/web/xclickcounter.html
I assume the following files can be ignored:
app/.buildlog
app/packages/*
app/web/out/*
app/web/packages
Is that correct?
When you put Dart source code in a repository—using the pub tool, GitHub, or another source code management system—don't include most of the files that your IDE or code editor, the pub tool, and other tools generate.
The . dart_tool directory, which is new in Dart 2, is used by pub and other tools. It replaces the . pub directory as of the 2.0. 0-dev.
If you are working on an application package, then you should keep the pubspec. lock file in your repository as a snapshot of your dependencies.
Use your favorite text editor to open the file called . git/info/exclude within the root of your Git repository. Any rule you add here will not be checked in, and will only ignore files for your local repository.
From What Not to Commit on dartlang.org:
# files and directories created by pub
.dart_tool/
.packages
.pub/
build/
pubspec.lock # Except for application packages
# API documentation directory created by dartdoc
doc/api/
# files and directories created by other development environments
*.iml # IntelliJ
*.ipr # IntelliJ
*.iws # IntelliJ
.idea/ # IntelliJ
.DS_Store # Mac
# generated JavaScript files
*.dart.js
*.info.json # Produced by the --dump-info flag.
*.js # When generated by dart2js. Don't specify *.js if your
# project includes source files written in JavaScript.
*.js_
*.js.deps
*.js.map
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With