handlino/FireApp — pull request #155 by Aaron3 (2013-06-21 18:55:06+00:00)
Title: Uglify .js files on change to javascripts_dir-min.

This is a hackjob that works. This is my first project ever in ruby that involved doing anything other changing a line of code. I don't expect a straight pull into the main project, but it may be useful for others.

Features:
1. Watches all .js files in javascripts_dir folder recursively for changes and saves the uglified versions as filename.min.js to the folder "#{javascripts_dir}-min".
2. Works with both LiveReload and coffeescript generated files.
3. Automatically uglifies all .js files on project load (except files named .min.js already)
4. Handles deleting .min.js files when .js files are deleted.
5. If you manually save a .min.js in your main js directory, it will create a minified version of it in your js-min folder, but will not change the extension to ".min.min.js".

Issues:
1. Needs to work with the configuration options to set minified folder names.
2. If your main /js/ folder contains "jquery.min.js" and "jquery.js" and you delete "jquery.min.js" it will also delete "/js-min/jquery.min.js"