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 https://github.com/dsummersl/bloomfilters/tarball/master
2. Manually edit the slug.json file. Add "bloomfilters" to "dependencies".
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.
If you want to include non-CommonJS non 'require' code you can also stitch that
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
# 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...