Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Dart: default gitignore?

Tags:

dart

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?

like image 777
Era Avatar asked Apr 17 '13 14:04

Era


People also ask

What not to commit dart?

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.

What is. dart_ tool folder?

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.

Should Pubspec lock be in git?

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.

How do I create a .gitignore file?

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.


1 Answers

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
like image 76
Alexandre Ardhuin Avatar answered Sep 23 '22 10:09

Alexandre Ardhuin