• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Missing details in improvements comments
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Missing details in improvements comments


  • Subject: Re: Missing details in improvements comments
  • From: Paul Hoadley <email@hidden>
  • Date: Wed, 14 Mar 2012 11:23:20 +1030

On 14/03/2012, at 3:29 AM, Johann Werner wrote:

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>

We do something quite similar, though for historical reasons we use 'JSMin_Task' for _javascript_, based on Douglas Crockford's JSMin code.

        <!-- Taskdef for JSMin, a task based on Douglas Crockford's code -->
        <taskdef name="jsmin" classname="net.matthaynes.jsmin.JSMin_Task" />
...
<!-- Minify JS -->
<jsmin suffix="false" force="true" copyright="Copyright (C) 2008-2011 Logic Squad">
<fileset dir="${dest.dir}/${project.name}.woa/Contents/WebServerResources/" includes="**/*.js" />
</jsmin> 

http://code.google.com/p/jsmin-ant-task/

Requires jsmin.jar on the classpath at build time, obviously.


-- 
Paul.

http://logicsquad.net/


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Missing details in improvements comments (From: Pascal Robert <email@hidden>)
 >Re: Missing details in improvements comments (From: Ramsey Gurley <email@hidden>)
 >Re: Missing details in improvements comments (From: Johann Werner <email@hidden>)

  • Prev by Date: Re: D2W Exception Handling
  • Next by Date: Re: Deployment Issue on Linux - Help Troubleshooting PLEASE
  • Previous by thread: Re: Missing details in improvements comments
  • Next by thread: Re: Missing details in improvements comments
  • Index(es):
    • Date
    • Thread