Scrunch performs 4 handy operations:
scrunch.combine(filepath or array_of_filepaths, options);--> returns a function that handles HTTP requests.
on the server...
npm install scrunch
var scrunch = ;// for any set of files you want to scrunch (while developing)app;// then, turn on the minify/compress options for speedy tiny files!app;
in the browser...
<!-- for all files as one, but still readable --><!-- or, for speedy tiny files -->
when true, adds comment before each file for ease of debugging.
specifies in milliseconds how often to check for file updates.
when true, runs the output through Uglify-JS2 to make things small.
when true, sends the HTTP response as gzip/deflate when possible.
sets the content-type header for HTTP response.
sets the max_age in the HTTP response (for browser caching)
This little module was created by The Chaos Collective and is being shared with the Node.js community as open source.
Go make awesome things!