updateIgnoreFiles function

Future<void> updateIgnoreFiles({
  1. String? directory,
})

Updates .gitignore and .pubignore files to include assetx.lock if not already present

Implementation

Future<void> updateIgnoreFiles({String? directory}) async {
  final dir = directory ?? Directory.current.path;

  await _updateIgnoreFile(filePath: '$dir/.gitignore', fileName: '.gitignore');

  await _updateIgnoreFile(filePath: '$dir/.pubignore', fileName: '.pubignore');
}