Copy files from
/js/ into your web path, include them, use them
If you find that you need multiple functions on a page, you probably want to create a custom build (and ask yourself if you should be using a real library.) MinimalJS uses Sprockets as an internal build system, making it simple do so yourself.
Create your file, specifying the modules you wish to use with
//= require <cookie> //= require <modal>
sprocketize -I lib/ myfile_template.js > myfile.js
All modules provide methods to a global library object. In the default build, this is called
mjs. If you are building your own, this can be changed in
Within a module, all variables are contained in an anonymous closure.
All code should generally not make JSLint sad, assuming:
/*jslint browser: true */ /*global mjs: true, window */