jspm / generator

JSPM Import Map Generator
Apache License 2.0
166 stars 21 forks source link

feat: reinstall method, fix destructuring case #144

Closed guybedford closed 2 years ago

guybedford commented 2 years ago

This adds a new generator.reinstall method which can be used to reinstall all the "imports" of the import map.

In the test case, we have an import map created to the development export of React. We create a generator instance to the production condition with this inputMap, then use generator.reinstall to get the same versions of React and its dependencies, but with the exports conditions switched into production mode.

This also updates to v1 of the @jspm/import-map project and fixes a number of input map decomposition bugs.

Works very naturally based on the new architecture, thanks @JayaKrishnaNamburu for mentioning this missing function!