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