Java Mailing List Archive

http://www.ant-tasks.com/

Home » Ant Users List »

AW: Who's Using YUI Compressor with ANT?

Jan Materne

2008-02-25

Replies: Find Java Web Hosting

Author LoginPost Reply
If you add a
 taskname="yui"
to your <apply> task, you'll get better log statements ...
(I prefer having the executed command in the log - not just "exec" or "apply".)

Jan


> -----Ursprüngliche Nachricht-----
> Von: Yannick Haudry [mailto:yhaudry@(protected)]
> Gesendet: Freitag, 22. Februar 2008 10:50
> An: Ant Users List
> Betreff: Re: Who's Using YUI Compressor with ANT?
>
> Hi,
>
> Adding the 'dest' attribute to the Apply task and moving up the '-v'
> argument (as shown below) should make it work !
>
> > <target name="js.minify">
> >   <apply executable="java" parallel="false" dest="destDIR">
> >      <fileset dir="aped\src" includes="APE.js,
> EventPublisher.js"/>
> >      <arg line="-jar"/>
> >      <arg
> path="yuicompressor-2.3.5\build\yuicompressor-2.3.5.jar"/>
>        <arg line="-v"/>
> >      <srcfile/>
> >      <arg line="-o"/>
> >
> >      <mapper type="glob" from="*.js" to="*-min.js"/>
> >      <targetfile/>
> >   </apply>
> > </target>
>
> Yannick
>
>
> On Thu, Feb 21, 2008 at 10:47 PM, Garrett Smith
> <dhtmlkitchen@(protected):
> > YUI Compressor does a pretty good job at minifying the JS.
> >
> > I like the idea of building multiple files and doing batch
> operations.
> >
> > I want to combine
> > a.js
> > b.js
> > c.js
> >
> > to
> > abc-min.js
> >
> > From windows cmd:
> > C:\Users\ape\ant>.\bin\ant -buildfile=..\build.xml js.minify
> > Buildfile: ..\build.xml
> >
> > js.minify:
> >
> > BUILD SUCCESSFUL
> > Total time: 0 seconds
> > ==============================
> > Cool! But where's my files?
> >
> > build.xml:
> > <project>
> > <target name="js.minify">
> >   <apply executable="java" parallel="false">
> >      <fileset dir="aped\src" includes="APE.js,
> EventPublisher.js"/>
> >      <arg line="-jar"/>
> >      <arg
> path="yuicompressor-2.3.5\build\yuicompressor-2.3.5.jar"/>
> >      <srcfile/>
> >      <arg line="-o"/>
> >      <arg line="-v"/>
> >      <mapper type="glob" from="*.js" to="*-min.js"/>
> >      <targetfile/>
> >   </apply>
> > </target>
> > </project>
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@(protected)
> > For additional commands, e-mail: user-help@(protected)
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)

©2008 ant-tasks.com - Jax Systems, LLC, U.S.A.