addNewGitIgnore method

void addNewGitIgnore(
  1. String pathApps,
  2. String appsName
)

Implementation

void addNewGitIgnore(String pathApps, String appsName) {
  final path = join(pathApps, '.gitignore');
  if (exists(path)) {
    String gitignore = readFile(path);
    gitignore = '''$gitignore
coverage/
test/coverage_helper_test.dart''';

    path.write(gitignore);
  } else {
    path.write('''# Miscellaneous
*.class
*.log
*.pyc
*.swp
.DS_Store
.atom/
.buildlog/
.history
.svn/

# IntelliJ related
*.iml
*.ipr
*.iws
.idea/

# The .vscode folder contains launch configuration and tasks you configure in
# VS Code which you may wish to be included in version control, so this line
# is commented out by default.
#.vscode/

# Flutter/Dart/Pub related
# Libraries should not include pubspec.lock, per https://dart.dev/guides/libraries/private-files#pubspeclock.
/pubspec.lock
**/doc/api/
.dart_tool/
.packages
build/

coverage/
test/coverage_helper_test.dart
''');
  }
}