dependency_visitor 0.1.1 dependency_visitor: ^0.1.1 copied to clipboard
Visits root package, transitive and immediate dependencies in order to search given file.
import 'package:dependency_visitor/dependency_visitor.dart';
Future<void> main() async {
print('Show which packages has LICENSE file:');
DependencyVisitor(filePath: 'LICENSE').run().listen((dependencyFile) {
print('Package: ${dependencyFile.packageName}:');
print(dependencyFile.content);
print('\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n');
}).onDone(() {
print('Done!');
});
}