commit | f03ff4fe8892fe6592446a7c8d8e2f19ac4b137f | [log] [tgz] |
---|---|---|
author | Jacob MacDonald <jakemac@google.com> | Tue Sep 18 10:33:55 2018 -0700 |
committer | GitHub <noreply@github.com> | Tue Sep 18 10:33:55 2018 -0700 |
tree | 46f2e445feeeb6fcd02be00b8957e64f85f0c37b | |
parent | d979abc2b9ffb3d4218ffe11dc2814700368fafe [diff] |
support package:http version 0.12.x (#20)
A package that defines a common class, PackageResolver
, for defining how to resolve package:
URIs. This class may be based on the current isolate's package resolution strategy, but it may also be explicitly defined by the user—for example, you could create a resolver that represents the strategy used to compile a .dart.js
file.
The Dart VM provides two mutually exclusive means of resolving package:
URIs: a package spec and a package root.
A package spec usually comes in the form of a .packages
file on the filesystem. It defines an individual root URL for each package name, so that package:$name/$path
resolves to $root/$path
.
A package root is a single URL that acts as the base for all package:
URIs, so that package:$name/$path
resolves to $base/$name/$path
.
This normalizes access to these resolution schemes, and makes it easy for code to resolve package URIs no matter where the resolution information comes from.