how to re-publish assets on every request in dev mode?

Hi everyone,

Is it possible to force Yii to publish the assets to a new directory (or at least publishing them again to the same directory) upon every request?

I just had to do some tweaking to a CSS file and I had to delete the asset dir all the time so Yii would publish the update asset

is there an easier way?


Yii will automatically update assets that are outdated if you publish them on a per file basis.

Only if you publish whole directories, yii won’t do any checks (because of performance reasons, I guess).

If you publish your css file separately, Yii will check the last-modified property and override the existing asset if necessary.

thanks for your answers

Is there no other way to enforce republishing for folders?

Especially for modules its no always possible to publish individual css files, if they depend on relatively linked image files.

Edit: Seems Yii 1.1.2 will have this feature: