CodeSleeve / asset-pipeline

This Laravel 4 package provides a very simple and easy to use asset pipeline. It was heavily inspired by the Rails asset pipeline. We make use of the wonderful Assetic package to help with pre-compliation!
http://www.codesleeve.com
MIT License
491 stars 53 forks source link

Disabling minification #186

Open tomboruta opened 10 years ago

tomboruta commented 10 years ago

I've been using asset-pipeline for about a month on a production site and I've been loving it. Then, I changed some CSS, deployed it to my production and my change wasn't showing, so I ran php artisan assets:clean on my production server per the instructions on the github README. For some reason all my JS & CSS were now getting minified (they were not previously). This broke my site (I know minification is an issue, which is why I didn't enable it). I didn't see a way to disable minification in the github README. I figured out a way by doing the following in asset-pipeline/config.php: Under filters, changed 'APP:environment()' to 'local' ex:

'.css' => array(
new Codesleeve\AssetPipeline\Filters\URLRewrite(App::make('url')->to('/')),
new EnvironmentFilter(new Codesleeve\AssetPipeline\Filters\CssMinFilter, 'local'),
),

Is that a good way of doing it? Should this have happened in the first place?

Thanks and keep up the good work!

dwightwatson commented 10 years ago

I just comment out the whole line that includes the CssMinFilter but either-or.