This provides a generator.htmlInject API to replace the previous htmlGenerate API.
We now support inputMap being HTML as well as a new addMappings API which allows adding additional import maps or HTML files to extract maps from to be amended to the current generator map.
traceInstall is now just pin
htmlInject is an entirely separate phase to map and module detection, effetively replacing the former htmlGenerate API with a two step process (and the below is verbatim what it has been replaced with):
When using htmlInject, a specific list of pins can be provided to only extract a subset of mappings. Alternatively setting trace: true will only inject traced mappings.
This resolves https://github.com/jspm/generator/issues/136, since by using htmlInject multiple times with custom pins / traces, the primary generation map can be plucked into submaps and injected into multiple sub-pages treating generation as a single operation for multiple pages.
Further refinements are made to the version resolution, deduping and handling of core mappings internally to support some new resolution edge cases, including extending Deno for Deno stdlib version reconstruction from an input map.
Improvements are made to the version constraint handling system by extending import map decomposition into not just lock decomposition but also constraint population.
The browser tests themselves are updated to use the new API.
generator.htmlInject
API to replace the previoushtmlGenerate
API.inputMap
being HTML as well as a newaddMappings
API which allows adding additional import maps or HTML files to extract maps from to be amended to the current generator map.traceInstall
is now justpin
htmlInject
is an entirely separate phase to map and module detection, effetively replacing the formerhtmlGenerate
API with a two step process (and the below is verbatim what it has been replaced with):When using
htmlInject
, a specific list of pins can be provided to only extract a subset of mappings. Alternatively settingtrace: true
will only inject traced mappings.This resolves https://github.com/jspm/generator/issues/136, since by using
htmlInject
multiple times with custom pins / traces, the primary generation map can be plucked into submaps and injected into multiple sub-pages treating generation as a single operation for multiple pages.Further refinements are made to the version resolution, deduping and handling of core mappings internally to support some new resolution edge cases, including extending Deno for Deno stdlib version reconstruction from an input map.
Improvements are made to the version constraint handling system by extending import map decomposition into not just lock decomposition but also constraint population.
The browser tests themselves are updated to use the new API.