toLeopard: Support relative "packaged" leopard library paths #91
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
For standalone sharing of projects, it's convenient to be able to package Leopard's library files right in the same folder as generated Leopard project source. This enables that use case by respecting
leopardJSURL
andleopardCSSURL
values which are neither external (e.g.https://unpkg.com/..."
) nor absolute/root-relative (e.g./leopard.min.css
). If such a relative path is provided, e.g.leopard.min.css
orlib/leopard.min.js
, toLeopard will automatically supply the appropriate./
or../
prefix when importing the path in generated source.Manually tested with custom local paths
leopard.min.js
andfoo%20bar%20baz/leopard.min.js
and snapshot-tested with the default unpkg values.This is a standalone change which doesn't support any other PRs.