dependency_sorter 0.2.0 copy "dependency_sorter: ^0.2.0" to clipboard
dependency_sorter: ^0.2.0 copied to clipboard

Sort your pubspec dependencies alphabetically. A tiny, well-tested CLI that fixes what the `sort_pub_dependencies` lint reports.

example/dependency_sorter_example.dart

import 'package:dependency_sorter/dependency_sorter.dart';

/// Sorts the `dependencies` of a pubspec document.
///
/// Run with `dart run example/dependency_sorter_example.dart`.
void main() {
  const unsorted = '''
dependencies:
  yaml: any
  args: any
''';

  final SortResult result = sortPubspecContents(unsorted, SortConfig.defaults);
  // ignore: avoid_print
  print(result.contents);
}
1
likes
160
points
129
downloads

Documentation

API reference

Publisher

verified publisherquasiflo.com

Weekly Downloads

Sort your pubspec dependencies alphabetically. A tiny, well-tested CLI that fixes what the `sort_pub_dependencies` lint reports.

Repository (GitHub)
View/report issues
Contributing

Topics

#pubspec #dependencies #formatter #cli

License

MIT (license)

Dependencies

args, meta, path, yaml

More

Packages that depend on dependency_sorter