minifyclientscript Minify and merge your CSS and JavaScript seamlessly via this ClientScript extension

  1. Requirements
  2. Changelog
  3. Usage
  4. More on this extension

This extension allows you to seamlessly minify and merge your CSS and JS files.

Requirements

Tested on 1.1.9, should work on 1.1.*

Changelog

20120507.1438 UTC+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

20120330.1039 UTC+1

  • added LOCK_EX to file_put_contents() to prevent certain access issues

20120327.1112 UTC+1

  • 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

Usage

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.

Example main.php:

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.

19 4
29 followers
2 167 downloads
Yii Version: 1.1
License: BSD-2-Clause
Category: Others
Developed by: ksangers
Created on: Feb 15, 2012
Last updated: 11 years ago

Downloads

show all

Related Extensions