jspm is a new package manager for JavaScript fornt-ends that comes with a universal module loading system. It integrates nicely with npm by adding a jspm property to the package.json that specifies what the jspm dependencies are. Mine looks like this:

One of the really cool things about jspm is that, while it uses npm to load packages, it allows multiple endpoints to be defined. By default, it has a Github endpoint. This allows packages to be installed from Github if they aren't in the npm registry. This is pretty handy when working with jQuery plugins, since most of them are not on the npm registry.

To control versioning and dependencies jspm also uses a config.js. This file is similar to RequireJS's config: it maps package names to their sources, allows them to specify their dependencies, and it allows shims to be written for packages that don't follow a module loading pattern. If you've ever used RequireJS, you'll recognize the shim configuration as necessary for loading jQuery plugins, which are always looking to modify globally scoped objects.

Shim Configuration

I am working with a jQuery plugin called Magnific Popup, which provides some nice image lightbox gallery functionality. To get it to load nicely, I use this shim: