I have the following block that starts and ends with HTML comments:
<script type="text/javascript" src="/assets/js/namespaces.js"></script> <script type="text/javascript" src="/assets/js/main.js"></script> <script type="text/javascript" src="/assets/js/header.js"></script> <script type="text/javascript" src="/assets/js/headerPremiumForm.js"></script> <script type="text/javascript" src="/assets/js/bootstrap.js"></script>
I created an ant task that finds everything between <!--source scripts--><!--end source scripts--> and replaces it with a new script file (in this case min.js), but I have problems with its operation .
This is what I have done so far:
<target name="update-source-with-new-compiled-files"> <replaceregexp match="\<!--source scripts--\>(.*?)\<!--end source scripts--\>" replace="\<script src='min.js'\>\</script\>" flags="g"> <fileset dir="${basedir}/../dist" includes="*"/> </replaceregexp> </target>
72lions
source share