pub_mirror 0.1.9 copy "pub_mirror: ^0.1.9" to clipboard
pub_mirror: ^0.1.9 copied to clipboard

outdated

A sample command-line application.

example/pub_mirror.dart

import 'package:pub_mirror/pub_mirror.dart' as pub_mirror;

main() async {
  final tool = pub_mirror.PubMirrorTool('/tmp/pub/', 'http://example.com/pub/',
      upstream: 'https://pub.flutter-io.cn/api',
      verbose: true,
      maxConnections: 10);

  // iterate over all the packages
  //await for (var package in tool.listAllPackages()) {
    //print('-> ${package.name}');
  //}

  // download the single package
  await tool.downloadPackage('pub_mirror');

  // download all packages with 100 threads
  await tool.download(100, overwrite: false);
}
4
likes
25
points
16
downloads

Publisher

unverified uploader

Weekly Downloads

A sample command-line application.

Repository (GitHub)
View/report issues

License

BSD-2-Clause (license)

Dependencies

args, executor, http, path, pedantic, pub_client

More

Packages that depend on pub_mirror