Skip to content
This repository was archived by the owner on Nov 23, 2018. It is now read-only.

Commit d701a01

Browse files
committed
Reworked jpeg task workflow
1 parent ccb7913 commit d701a01

File tree

2 files changed

+14
-19
lines changed

2 files changed

+14
-19
lines changed

build.xml

+13-19
Original file line numberDiff line numberDiff line change
@@ -1105,31 +1105,25 @@
11051105
</else>
11061106
</if>
11071107
</target>
1108-
1108+
11091109
<target name="-imagesjpg" depends="-mkdirs" description="(PRIVATE) Optimizes .jpg images using jpegtan">
11101110
<echo message="Now, we clean up those jpgs..."/>
1111-
1112-
<!-- By default set retain-meta-tags to all -->
1113-
<var name="retain-meta-tags" value="all"/>
1114-
1115-
<if>
1111+
<if>
11161112
<equals arg1="${images.strip.metadata}" arg2="true"/>
11171113
<then>
11181114
<var name="retain-meta-tags" value="none"/>
11191115
</then>
1116+
<else>
1117+
<var name="retain-meta-tags" value="all"/>
1118+
</else>
11201119
</if>
1121-
1122-
<!-- By default set jpegtran exec to windows's exe and set it to available -->
1123-
<var name="os.family" value="windows"/>
1124-
<var name="jpegtran.available" value="true"/>
1125-
<var name="jpegtran.executable" value="${basedir}/${dir.build.tools}/jpegtran.exe"/>
1126-
1127-
<!-- On *nix's and OS X, check for jpegtran and give a helpful message if it's not installed -->
11281120
<if>
1129-
<os family="unix"/>
1130-
<then>
1131-
<var name="os.family" value="unix"/>
1132-
<!-- Change the exec for *nix systems -->
1121+
<os family="windows"/>
1122+
<then>
1123+
<var name="jpegtran.available" value="true"/>
1124+
<var name="jpegtran.executable" value="${basedir}/${dir.build.tools}/${tool.jpegtran}"/>
1125+
</then>
1126+
<else>
11331127
<var name="jpegtran.executable" value="jpegtran"/>
11341128
<if>
11351129
<not>
@@ -1140,8 +1134,8 @@
11401134
<var name="jpegtran.available" value="false"/>
11411135
</then>
11421136
</if>
1143-
</then>
1144-
</if>
1137+
</else>
1138+
</if>
11451139

11461140
<!-- If jpegtran is available, let's start it -->
11471141
<if>

config/default.properties

+1
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,7 @@ tool.lesscss = less-rhino-1.3.3.js
163163
tool.jsdoc3 = jsdoc.js
164164
tool.optipng = optipng-0.7.4-win32/optipng.exe
165165
tool.advpng = advancecomp-1.15/advpng.exe
166+
tool.jpegtran = jpegtran.exe
166167
# Default Lint Utils Options
167168
tool.jshint.opts = maxerr=25,eqeqeq=true
168169
tool.jslint.opts = maxerr=25,evil=true,browser=true,eqeqeq=true,immed=true,newcap=true,nomen=true,es5=true,rhino=true,undef=true,white=false,devel=true

0 commit comments

Comments
 (0)