madskristensen / Packman

A client-side package manager
Other
28 stars 7 forks source link

Configure source in JSON #23

Open beruic opened 8 years ago

beruic commented 8 years ago

It would be nice if you could configure the source for packages in packman.json, and perhaps have a section per source and one for custom sources It would:

madskristensen commented 8 years ago

Yeah, i've been thinking about this, but I don't know if the source should be visible to the user at all. I'm not sure it matters if jQuery.js comes from JSDelivr or CDNJS, so why even show it - let alone make it configurable like it is now. Any thoughts on that?

beruic commented 8 years ago

Yes. The thing is that the content of the downloaded package differs between the two sources, and so does the name of some packages (e.g. bootstrap@JsDelivr vs twitter-bootstrap@CDNJS. This is very common in fact). Some packages are entirely unavailable from one of the sources, or not available in the same versions.

This also means that if your project uses packages from CDNJS, all developers must configure the extension to use CDNJS instead of JsDelivr. Otherwise you will get errors in your packman.json or some files may be unavailable from some packages.