Skip to content

Commit

Permalink
build script: jpegtran fun. default to stripping metadata. make the o…
Browse files Browse the repository at this point in the history
…utput WORK on mac. Oh and we actually want it to compress the files. :)
  • Loading branch information
paulirish committed Mar 5, 2011
1 parent 37f0ac6 commit 5ed87b9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
10 changes: 8 additions & 2 deletions build/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -646,6 +646,7 @@
<outputmapper type="glob" from="style-${build.number}.css" to="./${dir.publish}/${dir.css}/style-${build.number}.min.css"/>
</redirector>
</apply>

<replace token="style.css" value="style-${build.number}.min.css" dir="${dir.publish}" includes="${page-files}"/>
</target>

Expand Down Expand Up @@ -712,10 +713,12 @@
<fileset dir="./${dir.images}" includes="*.jpg"/>
<arg value="-copy"/>
<arg value="${strip-meta-tags}"/>
<arg value="-optimize"/>
<srcfile/>
<targetfile/>
<redirector>
<outputmapper type="glob" from="*.jpg" to="./${dir.publish}/${dir.images}/*.jpg"/>
</redirector>
<!-- you may want to flag optimized images. If so, do it here. Otherwise change this to type="identity" -->
<mapper type="glob" from="*.jpg" to="../${dir.publish}/${dir.images}/*.jpg"/>
</apply>
</then>
<elseif>
Expand All @@ -732,11 +735,14 @@
<fileset dir="./${dir.images}" includes="*.jpg"/>
<arg value="-copy"/>
<arg value="${strip-meta-tags}"/>
<arg value="-optimize"/>
<srcfile/>
<arg value=">"/>
<targetfile/>
<!-- you may want to flag optimized images. If so, do it here. Otherwise change this to type="identity" -->
<mapper type="glob" from="*.jpg" to="../${dir.publish}/${dir.images}/*.jpg"/>
</apply>
</target>


</project>
2 changes: 1 addition & 1 deletion build/config/default.properties
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ build.delete.unoptimized = true
#
# Image Optimisation
#
images.strip.metadata = false
images.strip.metadata = true
# Seting this to true will strip the metadata from all jpeg files.
# YOU SHOULD ONLY DO THIS IF YOU OWN THE COPYRIGHT TO ALL THE IMAGES IN THE BUILD

Expand Down

0 comments on commit 5ed87b9

Please sign in to comment.