[EXTENSION] yii-assetcompiler

I’ve created a new extension to manage javascript and less asset compilation. It’s using google closure (for javascript) and lessphp (for less). I would upload it to the extensions directory, but it says I am too new and to post here :) I have been a lurker for a few years, but just now getting to a point where I can contribute.

I know there are a number of other asset and minification extensions, but I didn’t feel there was one that supported all the features and modes I wanted. For example, this one supports less directly vs just css, so from my extension I can go directly from less files to compressed css.

Also, other other big one was I wanted more control over asset grouping and want to compile at deploy time, not during the request lifecycle.

I tried to create decent documentation, so hopefully its easy to install and configure. Any feedback or bug reports would be much appreciated.

Check it out on github: github.com/machadolab/yii-assetcompiler

(I guess I am so new the forum wouldn’t let me create a link - so sorry you have to copy/paste the above URL!)

It finally let me create it on the extensions site, so here it is!

http://www.yiiframework.com/extension/assetcompiler/

Summary:

yii-assetcompiler

Yii extension for js/less asset compilation and management

This extension uses the Google Closure compiler and lessphp to compile your assets into combined/optimized versions. The extension can do this compilation on the fly (using the autoCompile/forceCompile configuration parameters) but is designed to be compiled at deployment time using a yii console command. Views and layouts then make reference to the asset groups to bring in either the compiled asset (production mode) or the raw asset components (in developer mode).

The lessphp compiler was chosen because it is compatible with the Bootstrap framework’s usage of LESS.