Open trusktr opened 10 months ago
The flatten
operation is automatically called on all import maps generated on generator.jspm.io.
I can't get Generator to generate anything right now for previous versions of Lume that worked before
I was expecting something like this
{
"imports": {
"lume": "https://ga.jspm.io/npm:lume@0.3.0-alpha.28/dist/index.js"
},
"scopes": {
"https://ga.jspm.io/": {
"@lume/autolayout": "https://ga.jspm.io/npm:@lume/autolayout@0.10.1/dist/AutoLayout.js",
"@lume/custom-attributes/dist/index.js": "https://ga.jspm.io/npm:@lume/custom-attributes@0.2.1/dist/index.js",
"@lume/element": "https://ga.jspm.io/npm:@lume/element@0.10.1/dist/index.js",
// ... etc ...
}
}
}
to come out more like this after flattening:
{
"imports": {
"lume": "https://ga.jspm.io/npm:lume@0.3.0-alpha.28/dist/index.js",
"@lume/autolayout": "https://ga.jspm.io/npm:@lume/autolayout@0.10.1/dist/AutoLayout.js",
"@lume/custom-attributes/dist/index.js": "https://ga.jspm.io/npm:@lume/custom-attributes@0.2.1/dist/index.js",
"@lume/element": "https://ga.jspm.io/npm:@lume/element@0.10.1/dist/index.js",
// ... etc ...
},
}
I'd like the simplest import maps when possible, like a basic one someone would write by hand. It is less cognitive overhead, especially for people new to web development with no experience with build tools or command lines.
I'm trying to make things easy here:
If you really want this, define your dependencies as peerDependencies
not dependencies
....
Yeah right! 😆
For the use case, it was simple to add all the dependencies to the list to flatten it:
The CLI generator can generate a flat import map, but there's no option in the Generator ui at https://generator.jspm.io/#U2VhYGBkDM0rySzJSU1hcMgpzU3VT81JzU3NK3Ew0DM01DMAAFjZa1gjAA.
It would be really useful to have this option in the UI.