jspm: A strong contender for a JavaScript package manager that is friendly to node and the browser
jspm extends package.json and supports loading modules from npm, directly from GitHub or from a browser global variable. Plugins are available that really make it extendable to any module system.
You use the familiar require()
syntax but with prefixes such as “npm:” and
“github:“. In the module itself, you can use various methods of exports,
including ES6 export
syntax. ES6 import
is also supported via transpiling.
Example:
var collections = require(‘npm:lodash-node/modern/collections’); var $ = require(‘github:components/jquery’); $(document.body).html(collections.max([1,2,3,4]));
Read more at jspm.io