Note that there are some explanatory texts on larger screens.

plurals
  1. POHow do i changed Header and Footer by using ANT?
    primarykey
    data
    text
    <p>Is it possible to change via ant the section of new created *.html files?</p> <p>Detailed: I have a index.php within a lot of *.css includes and *.js includes. These files i minified with the google min/lib. currently i grep the ressoruce page index.php and create a new index.html file - see XML example.</p> <p>Yet here are the same includes of CSS like in the index.php and i dont know how to insert in the new index.html a new header where i only have the statement to inser the compressed style.css</p> <p>what i want to make in the new index.html</p> <pre><code>&lt;link rel="stylesheet" href="css/style.css"&gt; </code></pre> <p>and not all other uncompressed calls which are in the index.php</p> <p>My build.xml:</p> <pre><code>&lt;?xml version="1.0"?&gt; &lt;project name="myProject" default="" basedir="."&gt; &lt;property file="build.properties"/&gt; &lt;property name="export.temp_dir" value="${myProject.build_dir}${project.export.dir}${project.export.tmpDir}" /&gt; &lt;property name="export.release_dir" value="${myProject.build_dir}${project.export.dir}${project.export.releaseDir}" /&gt; &lt;property name="release" value="${project.release.name}" /&gt; &lt;target name="generate" depends=""&gt; &lt;delete dir="${export.temp_dir}" /&gt; &lt;mkdir dir="${export.temp_dir}${project.resources.fileDir}css"/&gt; &lt;get dest="${export.temp_dir}${project.resources.fileDir}css/style.css" src="${myProject.host}min/index.php?g=css"/&gt; &lt;!-- Generating Pages --&gt; &lt;!-- By creating the file i would insert a new include statement --&gt; &lt;get dest="${export.temp_dir}${project.resources.fileDir}index.html" src="${myProject.host}index.php"/&gt; &lt;!-- Create target directory --&gt; &lt;copy todir="${export.temp_dir}${project.resources.fileDir}"&gt; &lt;fileset dir ="${myProject.base_dir}/" casesensitive="yes"&gt; &lt;include name="**/*.ico"/&gt; &lt;include name="**/*.gif"/&gt; &lt;include name="**/*.jpg"/&gt; &lt;include name="**/*.png"/&gt; &lt;exclude name="img/*"/&gt; &lt;/fileset&gt; &lt;/copy&gt; &lt;/target&gt; &lt;target name="updateCss" depends="generate"&gt; &lt;replaceregexp match="\&amp;lt;!--source scripts--\&amp;gt;(.*?)\&amp;lt;!--end source scripts--\&amp;gt;" replace="\&amp;lt;script src='css/base.css'\&amp;gt;\&amp;lt;/script\&amp;gt;" flags="gs"&gt; &lt;fileset dir="${export.temp_dir}${project.resources.fileDir}css/" includes="*"/&gt; &lt;/replaceregexp&gt; &lt;/target&gt; &lt;/project&gt; </code></pre> <p>im using ant:Apache Ant(TM) version 1.8.2 compiled on December 3 2011</p> <p>is it possible and if how can i solved it?</p> #EDIT <p>ive found this article: <a href="https://stackoverflow.com/questions/8003494/ant-replaceregexp-task-match-and-replace-html-comments-block">Ant replaceregexp task - Match and replace HTML comments block</a></p> <p>to replace something, but if i insert it as a new target it doesnt work well. ant trhow no error but the before created .html becomes no replacement and i dont know why. the comments exists in the .php file.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload