Need min file for each css file, how to get it?

Nov 1, 2011 at 11:25 PM

Hi, today i was trying for the first time using YUI i am trying to compress all the css file in our project, but $(CssOutputFile) will allow only one file for all the .css file, but i need to compres .css file individually and create separate .min file. ItemGroup accept css file '*.css' but out put file is not supported? or may be i am missing? can any experts will guide please?

Thank you
JK

Coordinator
Nov 3, 2011 at 5:21 AM

Hi JK. there was a discussion about that, somewhere on these forums but I can't find it.

You can definitely do that. The trick is to have one CompressorTask per single .css/,js file you want to compress/minify.

<CompressorTask
            CssFiles="$(SourceLocation)StylesheetSample1.css"
           CssOutputFile="whatever1.css.min"
            ....
/>
<CompressorTask
            CssFiles="$(SourceLocation)StylesheetSample2.css"
           CssOutputFile="whatever2.css.min"
            ....
/>