You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently import maps generated by JSPM generator are always made comprehensively against the JSPM CDN.
There could be benefit in having a checkout API that enables a way to bring CDN workflows back to the local file system.
Consider an import map has already been generated for the generator, then we might want to perform the following steps:
constfsMap=generator.checkout({// if any package has only one import with no deps,// don't check out the whole folder and instead rename// the module to just be the name of the package itselfsingleFileCheckouts: true,// if a package only has one version, skip the version in the package namesingleVersionNaming: true,// if a package only comes from one registry, skip the registry version namesingleRegistryNaming: true,// required option to actually do any workcheckoutUrls: {'https://ga.jspm.io/': './third_party/jspm/','https://unpkg.com/': './third_party/unpkg/',});// Output is a map of URLs to local paths// The import map returned then works against these local paths directlyreturning{// single file package'https://ga.jspm.io/npm:pkg@1.2.3/': {singleFile: true,// enabled by "singleFileNaming" option abovetarget: './third_party/jspm/mod.js',traced: ['mod.js'],static: ['package.json','app.test.js']}// directory package'https://ga.jspm.io/npm:dep@1.2.3/': {singleFile: false,target: './third_party/jspm/dep/',traced: ['index.js','dep.js'],static: ['package.json','asset.txt']}// multi-version package (and for its single-file variant)'https://ga.jspm.io/npm:multi-version@1.2.3/': {singleFile: false,target: './third_party/jspm/multi-version@1.2.3/',traced: ['index.js','dep.js','dynamic-import.js'],static: ['package.json','asset.txt','unused.js']}}
The import map is then updated to work against the new file mappings, and the download operation can be completed with a simple fetch loop over the files. Non-JS files could be included in the file map for directory packages along with their associated mappings.
The text was updated successfully, but these errors were encountered:
Currently import maps generated by JSPM generator are always made comprehensively against the JSPM CDN.
There could be benefit in having a checkout API that enables a way to bring CDN workflows back to the local file system.
Consider an import map has already been generated for the generator, then we might want to perform the following steps:
The import map is then updated to work against the new file mappings, and the download operation can be completed with a simple fetch loop over the files. Non-JS files could be included in the file map for directory packages along with their associated mappings.
The text was updated successfully, but these errors were encountered: