addNewGitIgnore method

void addNewGitIgnore(
  1. String pathFeature,
  2. String featureName,
  3. String appsName
)

Implementation

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

    pathIgnore.write(gitignore);
  } else {
    pathIgnore.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
''');
  }
}