ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Garrett Smith" <dhtmlkitc...@gmail.com>
Subject Re: Who's Using YUI Compressor with ANT?
Date Fri, 22 Feb 2008 21:06:40 GMT
On 2/22/08, Yannick Haudry <yhaudry@gmail.com> wrote:
> Hi,
>
>  Adding the 'dest' attribute to the Apply task and moving up the '-v'
>  argument (as shown below) should make it work !

Thanks that worked great! Files are minified now.

docs:
http://ant.apache.org/manual/CoreTasks/apply.html

So I ran the whole thing on **/* and min'd them all. I also made a
<copy> command in a new target.

It's great. But I still want to figure a few more things out.

I want to build to files and combine them into one:
  a.js
  b.js

result:
  a-b.js

How to do this?

Garrett


> Yannick
>
>
>
>  On Thu, Feb 21, 2008 at 10:47 PM, Garrett Smith <dhtmlkitchen@gmail.com> wrote:
>  > 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@ant.apache.org
>  >  For additional commands, e-mail: user-help@ant.apache.org
>  >
>  >
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>  For additional commands, e-mail: user-help@ant.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message