java - How do i changed Header and Footer by using ANT? -
is possible alter via ant section of new created *.html files?
detailed: have index.php within lot of *.css includes , *.js includes. these files minified google min/lib. grep ressoruce page index.php , create new index.html file - see xml example.
yet here same includes of css in index.php , dont know how insert in new index.html new header have statement inser compressed style.css
what want create in new index.html
<link rel="stylesheet" href="css/style.css">
and not other uncompressed calls in index.php
my build.xml:
<?xml version="1.0"?> <project name="myproject" default="" basedir="."> <property file="build.properties"/> <property name="export.temp_dir" value="${myproject.build_dir}${project.export.dir}${project.export.tmpdir}" /> <property name="export.release_dir" value="${myproject.build_dir}${project.export.dir}${project.export.releasedir}" /> <property name="release" value="${project.release.name}" /> <target name="generate" depends=""> <delete dir="${export.temp_dir}" /> <mkdir dir="${export.temp_dir}${project.resources.filedir}css"/> <get dest="${export.temp_dir}${project.resources.filedir}css/style.css" src="${myproject.host}min/index.php?g=css"/> <!-- generating pages --> <!-- creating file insert new include statement --> <get dest="${export.temp_dir}${project.resources.filedir}index.html" src="${myproject.host}index.php"/> <!-- create target directory --> <copy todir="${export.temp_dir}${project.resources.filedir}"> <fileset dir ="${myproject.base_dir}/" casesensitive="yes"> <include name="**/*.ico"/> <include name="**/*.gif"/> <include name="**/*.jpg"/> <include name="**/*.png"/> <exclude name="img/*"/> </fileset> </copy> </target> <target name="updatecss" depends="generate"> <replaceregexp match="\<!--source scripts--\>(.*?)\<!--end source scripts--\>" replace="\<script src='css/base.css'\>\</script\>" flags="gs"> <fileset dir="${export.temp_dir}${project.resources.filedir}css/" includes="*"/> </replaceregexp> </target> </project>
im using ant:apache ant(tm) version 1.8.2 compiled on dec 3 2011
is possible , if how can solved it?
#editive found article: ant replaceregexp task - match , replace html comments block
to replace something, if insert new target doesnt work well. ant trhow no error before created .html becomes no replacement , dont know why. comments exists in .php file.
java regex apache ant
No comments:
Post a Comment