require.js does everything you need.
My answer to this question may help you
Example:
Client app project hierarchy:
sampleapp
|___ main.js
|___ cs.js
|___ require.js
main.js is where you initialize your client application and configure require.js:
require.config({
baseUrl: "/sampleapp",
paths: {
jquery: "libs/jquery", // Local
underscore: "http://underscorejs.org/underscore-min.js", // Remote
backbone: "https://github.com/documentcloud/backbone/blob/master/backbone-min.js" // Remote on github
},
shim: {
backbone: {
deps: ["underscore", "jquery"] // Backbone depends on jquery and underscore
}
}
});
require(["cs!someCoffeescriptFile", "jquery", "backbone", "underscore"], function (SomeCoffeescriptFile, $, Backbone, _) {
// Dependencies are loaded...
// Execute code
});
Dependencies will use the cs plugin when prepended by "cs!". The cs plugin compiles the coffeescript file.
When you go in prod, you can pre-compile your whole project with r.js.
node ./node_modules/requirejs/bin/r.js -o buildclientconfig.js
Here are your requirements:
Manage my client side dependencies in a format similar to npm's
package.json or bower's component.json. Different but AS GOOD!
I should have the flexibility to point to git repo or actual js
files (either on web or locally) in my dependency.json file for
lesser known libraries (npm let's you point to git repos). YES
It should minify and namespace all libraries into a single file like
ender - that's the only js file I would need to put in my script-tag
in the client side. YES with r.js.
It should have out of box support for coffeescript like Box. YES
In the browser I can use either require style or headjs. YES