• 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: Ramsey Gurley <email@hidden>
  • Date: Tue, 13 Mar 2012 10:26:14 -0700


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@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Missing details in improvements comments
      • From: Johann Werner <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: Missing details in improvements comments
  • Previous by thread: Re: Missing details in improvements comments
  • Next by thread: Re: Missing details in improvements comments
  • Index(es):
    • Date
    • Thread