markstory/asset_compress — Issue #89: JsMin & CssMin not minifying?
Author: fullybaked
Created: 2012-01-06 15:56:58+00:00
State: open

Just dropped your plugin into a clean Cake 2.0.5 app to try it out

I put together the following config ini file

[General]
writeCache = true
cacheConfig = false
timestampFile = true

[js]
paths[] = APP/Assets/js/*
cachePath = WEBROOT/js/
stripComments = true
timestamp = true
filters[] = JsMinFilter

[js_jquery-combined.js]
files[] = jquery.js
files[] = jquery.ui-core.js

[js_application.js]
files[] = test.coffee
filters[] = CoffeeScript

[css]
timestamp = true
stripComments = true
paths[] = APP/Assets/css/*
cachePath = WEBROOT/css/
filters[] = CssMinFilter

[site.css]
files[] = reset.css
files[] = layout.css

The CoffeeScript filter is working perfectly, however neither the CssMin or the JsMin are doing anything to the files.

CssMin is installed at

/vendors/cssmin/CssMin.php

JsMin at

/vendors/jsmin/jsmin.php

(global vendors not app/Vendor)

If I add the JsMinFilter option to the coffeescript section it stops the coffeescript filter from preprocessing the file.

Sorry if this is an error between the keyboard and the chair at my end, but I've been tearing my hair out trying to get this to work and failing. I've tried it with the filters on the build file blocks as well as the file extension blocks and neither have any affect.

If there is any other information needed, let me know