It would be really nice to have a drush command to quickly turn on/off CSS files optimizations (maybe also JS files optimizations) where currently we have to go to admin/settings/performance to change that.

That will make it much more convenient when fixing CSS for IE, where you have to toggle between the settings to see CSS files info on FF firebug and to see the results on IE (IE has a limit for number of CSS files, so you usually have to turn CSS files optimization on for it to work).

Thank you!

CommentFileSizeAuthor
#4 drush_css_js-1195030-4.patch2.4 KBm4olivei

Comments

klokie’s picture

You can just run some combination of the following commands to suit your purpose:

drush vset preprocess_css 0  # disable CSS optimization
drush vset preprocess_js 0   # disable Javascript optimization
drush cc css+js              # clear the two output caches
jonhattan’s picture

Status: Active » Closed (won't fix)

Such mini commands won't be accepted in drush, because of simplicity. Perhaps there's room for it in drush_extras.

btw #1 is right.

maustyle’s picture

Issue summary: View changes

#1 incorrectly writes

drush cc css+js

use

drush cc css-js

instead.

m4olivei’s picture

Project: Drush » Drush extras
Version: All-versions-4.2 » 7.x-3.x-dev
Component: Core Commands » Code
Assigned: Unassigned » m4olivei
Status: Closed (won't fix) » Needs review
StatusFileSize
new2.4 KB

Hello,

I wanted this functionality too, and it seemed like an easy command to get my feet wet with writing Drush commands, so I did it. Attached for drush_extras that adds a command turn on/off css/js aggregation. It has options to do only one of them or both and will run the sequence of commands in comment #1. I probably have to do something slightly different for Drupal 6. I may yet include that.

Thanks!
Matt