On 8 August 2013 11:27, James Coglan <[email protected]> wrote:
> Quick question: can someone recommend a CSS compressor library? I've tried
> clean-css but the fact that it silently ignores when files referenced by
> @import doesn't exist and deletes the @import statement seems like a bad
> idea. Are there other libs that inline @import statements robustly?

When you call cleancss.process(css), just add an extra option:

```
var minified = cleancss.process(css, { processImport : false });
```

This will keep your @import statements intact. I found out this was
added in version v1.0.12 of clean-css which was uploaded to npm 3
weeks ago. :) Hope that helps.

I'm using clean-css here since it's an awesome library : http://cssminfier.com/

Cheers,
Andy

-- 
contact: Andrew Chilton
website: http://www.chilts.org/blog/
twitter: https://twitter.com/andychilton
github: https://github.com/chilts/

-- 
-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to