A package manager for web assets

Tobu picture Tobu · Sep 8, 2011 · Viewed 7.9k times · Source

Do you know a package manager for web assets?

I'd like something that can download libraries such as jQuery so I can plug them into my asset pipeline. The js.* python packages for fanstatic are close, but they pick a single "latest" version of the library, which can lag a few releases behind.

Google's js cdn has the metadata for a few of them, but is mostly designed to be downloaded by the browser directly.

Answer

Tobu picture Tobu · Sep 13, 2011

I've found these package managers for in-browser javascript:

Most of these can publish in the AMD format for browser loaders, and can be loaded by RequireJS. They also tend to use the CommonJS package format (also used by npm) for their package.json metadata.

I also found XStatic, which seems to be a less-active version of fanstatic, and like fanstatic wraps the libraries in Python packages. It has the same limitation (versions tend to lag), but writing a wrapper package seems simple enough that I can bake my own updates.

BPM and fanstatic are aware of non-js assets and can merge or minify CSS.