Looks like you could do both applys in one run to save some time.

On 2012-03-13, at 10:26 AM, Ramsey Gurley wrote:
> On Mar 13, 2012, at 9:59 AM, Johann Werner wrote:
>> Am 13.03.2012 um 16:41 schrieb Ramsey Gurley:
>> On Mar 13, 2012, at 2:57 AM, Pascal Robert wrote:
>>> 
>>>> A mechanism to help processing web resources. It is hard to use tools like 
>>>> LESS or JS minification with the current set of tools.
>>> 
>>> 
>>> I think this means it would be cool to have a preprocessor in our build.xml 
>>> files to minify js and process css stylesheets.  I agree, that would be 
>>> awesome.  Surely someone has done this already.  Perhaps that someone could 
>>> post an example so we don't have to figure it out from scratch :-)
>> 
>> to minify js and css add this to your build.xml:
>> 
>> 
>> <target name="minify" if="yuicompress.available">
>>      <echo message="Minification of CSS files." />
>> 
>>      <apply executable="java" dir="${dest.dir}" relative="true">
>>              <fileset dir="${dest.dir}" 
>> includes="**/WebServerResources/**/*.css"/>
>>              <arg line="-jar"/>
>>              <arg path="${yuicompress.jar}"/>
>>              <srcfile/>
>>              <arg line="--charset"/>
>>              <arg value="utf-8"/>
>>              <arg line="-o"/>
>>              <targetfile/>
>>              <mapper type="identity"/>
>>      </apply>
>>      <replace dir="${dest.dir}" includes="**/WebServerResources/**/*.css" 
>> token=";}" value="}"/>
>> 
>>      <echo message="Minification of JS files." />
>> 
>>      <apply executable="java" dir="${dest.dir}" relative="true">
>>              <fileset dir="${dest.dir}" 
>> includes="**/WebServerResources/**/*.js"/>
>>              <arg line="-jar"/>
>>              <arg path="${yuicompress.jar}"/>
>>              <srcfile/>
>>              <arg line="--charset"/>
>>              <arg value="utf-8"/>
>>              <arg line="-o"/>
>>              <targetfile/>
>>              <mapper type="identity"/>
>>      </apply>
>> </target>
>> 
>> though that should be done only for deployment (i.e. building Wonder with 
>> that would make debugging js code in Eclipse hard).
> 
> Cool. So you would just include that in the app's build.xml and 
> yuicompress.jar in the classpath?  Maybe we could add that into the project 
> templates and drop yuicompress into ERJars?
> 
> Ramsey
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list      ([email protected])
> Help/Unsubscribe/Update your Subscription:
> https://lists.apple.com/mailman/options/webobjects-dev/chill%40global-village.net
> 
> This email sent to [email protected]

-- 
Chuck Hill             Senior Consultant / VP Development

Practical WebObjects - for developers who want to increase their overall 
knowledge of WebObjects or who are trying to solve specific problems.    
http://www.global-village.net/gvc/practical_webobjects








Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to