jspm / generator

JSPM Import Map Generator
Apache License 2.0
160 stars 20 forks source link

Expose parsePkgUrl functionality as a utility hook #260

Closed guybedford closed 1 year ago

guybedford commented 1 year ago

For integration scenarios, in https://github.com/jspm/generator#utility-functions, it would be useful to expose this internal provider function.

guybedford commented 1 year ago
import { parsePkgUrl } from '@jspm/generator';

parsePkgUrl('https://site.com/some/url')

with an optional second argument for provider "lookup options" as per the current utility functions - https://github.com/jspm/generator/blob/main/src/generator.ts#L1374.