shelf_packages_handler 2.0.0

  • Readme
  • Changelog
  • Installing
  • 95

A package that provides a shelf handler for serving a packages/ directory. It's intended to be usable as the first handler in a Cascade, where any requests that include /packages/ are served package assets, and all other requests cascade to additional handlers.

2.0.0 #

Breaking changes #

  • Dropped the dependency on package_resolver.
    • All PackageResolver apis now take a Map<String, Uri> of package name to the base uri for resolving package: uris for that package.
    • Named arguments have been renamed from resolver to packageMap.

1.0.4 #

  • Set max SDK version to <3.0.0, and adjust other dependencies.

1.0.3 #

  • Require Dart SDK 1.22.0
  • Support package:async v2

1.0.2 #

  • Fix Strong mode errors with package:shelf v0.7.x

1.0.1 #

  • Allow dependencies on package:shelf v0.7.x

0.0.1 #

  • Initial version

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  shelf_packages_handler: ^2.0.0

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter pub get

Alternatively, your editor might support pub get or flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:shelf_packages_handler/shelf_packages_handler.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
97
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
82
Overall:
Weighted score of the above. [more]
95
Learn more about scoring.

We analyzed this package on Mar 30, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.7.1
  • pana: 0.13.6

Maintenance suggestions

Maintain an example. (-10 points)

Create a short demo in the example/ directory to show how to use this package.

Common filename patterns include main.dart, example.dart, and shelf_packages_handler.dart. Packages with multiple examples should provide example/README.md.

For more information see the pub package layout conventions.

The package description is too short. (-8 points)

Add more detail to the description field of pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0 <3.0.0
path ^1.0.0 1.6.4
shelf ^0.7.0 0.7.5
shelf_static ^0.2.0 0.2.8
Transitive dependencies
async 2.4.1
charcode 1.1.3
collection 1.14.12
convert 2.1.1
http_parser 3.1.4
meta 1.1.8
mime 0.9.6+3
source_span 1.7.0
stack_trace 1.9.3
stream_channel 2.0.0
string_scanner 1.0.5
term_glyph 1.1.0
typed_data 1.1.6
Dev dependencies
test >=1.0.0 <2.0.0