Permalink
Browse files

Moving foreach call and processing the files one line at a time

Moving call from -css to -usemin as the HTML files were not copied yet
for the replace to take place, resulting in a task that got falsely
executed.

As for the regex, replacing one line a time may be inefficient but is
safer.
  • Loading branch information...
1 parent 7fd134f commit f940e3cebd3493a5b6fda81ba99d97a3b5ea4de2 @tarciosaraiva tarciosaraiva committed Apr 4, 2012
Showing with 3 additions and 2 deletions.
  1. +3 −2 build.xml
View
@@ -649,6 +649,8 @@
<fileset dir="${dir.intermediate}" includes="${page-files}"/>
</replaceregexp>
+ <foreach list="${file.stylesheets}" param="css_file" target="-css-remove-concatenated-stylesheets" />
+
</target>
@@ -791,7 +793,7 @@
<target name="-css-remove-concatenated-stylesheets">
<echo>Removing ${css_file} from html</echo>
- <replaceregexp match="&lt;link.+href=&quot;.*${css_file}&quot;.*&gt;" replace=" ">
+ <replaceregexp match="&lt;link.+href=&quot;.*${css_file}&quot;.*&gt;" replace=" " byline="true">
<fileset dir="${dir.intermediate}" includes="${page-files}"/>
</replaceregexp>
</target>
@@ -935,7 +937,6 @@
<mapper type="glob" from="*.css" to="${basedir}/${dir.publish}/${dir.css}/*.css"/>
<targetfile/>
</apply>
- <foreach list="${file.stylesheets}" param="css_file" target="-css-remove-concatenated-stylesheets" />
</target>

0 comments on commit f940e3c

Please sign in to comment.