This extension allows you to seamlessly minify and merge your CSS and JS files.
Tested on 1.1.9, should work on 1.1.*
- fixed bug where the wrong resources were checked, causing the js to rebuild every request comment#8052 crasx
- fixed bug where POS_* was ignored; thanks Renka
- added LOCK_EX to file_put_contents() to prevent certain access issues
- fixed bug on Windows(?) hosts; comment#7505 Jesse
- added return values to registerScript and registerCss; comment#7492 thyseus
- fixed a bug where CSS wasn't loaded correctly
Extract the files to the corresponding directories, components/ into compontents/ and extensions/ into extensions/ then configure the config file as described below, now MinifyClientScript will do the rest. :) Please comment if you have comments/suggestions/questions.
return array( ... 'components'=>array( ... 'clientScript'=>array( 'class'=>'application.components.MinifyClientScript', ), ... ), ... );
More on this extension ¶
I have written a blog about minifying and merging CSS/JS, read more about it HERE.