How to manage client-side JavaScript dependencies? [closed]

How to manage client-side JavaScript dependencies? [closed]

Although there are great solutions to manage dependencies on the server side, I could not find any that satisfies all my needs to have a coherent client side JavaScript dependency management workflow. I want to satisfy these 5 requirements:

Manage my client side dependencies in a format similar to npm’s package.json or bower’s bower.json
It 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 you point to git repos)
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

1. npm --save install coffee-script
2. Manually edit the slug.json file. Add "coffee-script" to "dependencies".

Suppose you wanted to include your own module 'bloomfilters' and it wasn't in the npm registry. You could add it to your project in the following way:

1. npm --save install
2. Manually edit the slug.json file. Add "bloomfilters" to "dependencies".

Local modules

If you want to include your own coffee or javascript you can do so by adding
those files to the app/ folder. Note that in order to expose your script via
the 'require' method you must make it a CommonJS module. It is very simple -
see the hem docs.

Local files

If you want to include non-CommonJS non 'require' code you can also stitch that
by referencing your custom javascript or coffeescript via the 'libs' list in


Hem will stitch together your CSS too, if you want. See the hem docs.


Once you have your dependencies listed, you can use hem to stitch them all together.

# make sure all dependencies are present:
npm install .
# make public/application.js
hem build
# see your minified js in public/application.js


Hem was meant for the spinejs project - but you don't
have to use it for that. Ignore any docs mentioning spine as you wish...