Closed Trott closed 12 years ago
Keep in mind that DTs, whenever we get it into production, will replace the current implementation in some way.
Eric, can you comment on the following for review/feature/js_vars_helper?
Manual minification? Dude, I feel like I don't even know you.
Just kidding. Sort of.
Well, as if JS_Vars_Helper needed any help selling itself, here's an automated minifier for vars.php called extract_php_tokens.php. Whoops, I should rename that. Still, yay, no more manual minification for vars.php.
7af4770b69e4fbf23573a6f4cf481d8db61f6195
I'd really, really, really like to merge this into develop (both the minifier and the JS_Vars_Helper object). How are you feeling about it?
Let me review it over the weekend, and then we should be good to next week.
2221eac19556ad5b86b3f62d1eaa20f835ff41e0 has a minor update to a comment.
And an elimination of commented code in eb202bdf93e625250de6f76ce3cf4208637b3bf0. Hooray for minutiae,
Zorayr and I spoke about minifiers a couple weeks ago when we were trying to do something JIT for DTS, and what we arrived at was that we didn't like the idea of adding another dependency to the stack like Java, even if it's just a dev tool.
Therefore, I would say I like where we're headed with JS_Vars_Helper, but I don't like the addition of YUI. Can you use a PHP minifier instead?
Added unit tests, restored @author tag per your comment.
The main issue with using a PHP-based minifier is that they simply do not minify as aggressively as YUI. I'll make it a command-line option that defaults to JSMin but will let you specify YUI if you want it.
By the way, if you're looking to remove things that aren't PHP/JS/CSS/HTML from the app, don't forget about install.sh
.
OK, I added a -m flag to select yui or jsmin on the command line. b5e2f5f27aa9839a922fd70f784ee25bb38dbb2f I had to update the jsmin.class.php implementation to one that preserves comments that are marked important (i.e., start with /! rather than just /).
Encapsulation, separation of PHP from JS, unit tests for the PHP pieces.