Open justinbmeyer opened 5 years ago
I think steal-tools should have some new builds, for CDN and for native module usage. I would want something like:
dist/
es/
unpkg/
can-component.js
local/
can-component.js
In the "local" build module specifiers have been rewritten to be point to the node modules. For example the above might do `import stache from "../../../../node_modules/can-stache/dist/local/can-stache.js". This is nice because you can work locally and things will be generally fast. The downside here would be that it expects a "flat" node_modules, so you if have multiple versions of any packages that will not work.
In the "unpkg" build module specifiers have been rewritten to point to a CDN (unpkg or maybe configurable). It will be like import stache from "https://unpkg.com/can-stache@^4.0.0/dist/unpkg/can-stache.js
.
can-crud
is built similar to howcanjs
's packages are built:While this is great for
npm
and a module loader, this doesn't make it easy to use on something like a codepen. I'd like something like the following to work:Where
//unpgk.com/can-crud@1
is importing canjs from//unpgk.com/can@5
.I'm not sure how this could work. Possibly via some mapping, including being able to import a mapping from
can
: