You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@wookie.apache.org by sc...@apache.org on 2012/03/09 18:29:19 UTC

svn commit: r1298935 - /incubator/wookie/trunk/widgets/templates/build.xml

Author: scottbw
Date: Fri Mar  9 17:29:18 2012
New Revision: 1298935

URL: http://svn.apache.org/viewvc?rev=1298935&view=rev
Log:
Added target to template build file to strip out anything between <% %> tags - this can be used to remove comments that aren't needed in the built widget. See WOOKIE-314

Modified:
    incubator/wookie/trunk/widgets/templates/build.xml

Modified: incubator/wookie/trunk/widgets/templates/build.xml
URL: http://svn.apache.org/viewvc/incubator/wookie/trunk/widgets/templates/build.xml?rev=1298935&r1=1298934&r2=1298935&view=diff
==============================================================================
--- incubator/wookie/trunk/widgets/templates/build.xml (original)
+++ incubator/wookie/trunk/widgets/templates/build.xml Fri Mar  9 17:29:18 2012
@@ -55,6 +55,17 @@
         </dirset>
       </subant>
     </target>
+	
+	<target name="_remove_comments">
+	      <echo message="+------------------------------------------"/>
+	      <echo message="|  Removing comments from files:           |"/>
+	      <echo message="|  in: ${widget.build.dir}/${widget.shortname}"  />
+	      <echo message="+------------------------------------------"/>
+    	<replaceregexp match="&lt;\%[^&gt;]*&gt;" flags="g" replace="" >
+    		  <fileset dir="${widget.build.dir}/${widget.shortname}" >
+    		  </fileset>
+    	</replaceregexp>
+	</target>
 
     <target name="generate-test-widgets"
             description="Generate a single test widget from the template">
@@ -101,9 +112,10 @@
           <propertyref prefix="${widget.shortname}"/>
         </propertyset>
       </antcall>
+        <antcall target="_remove_comments"/>
 
       <antcall target="_copy_widget_files"/>
-
+        <antcall target="_remove_comments"/>
     </target>
 
     <target name="_copy_widget_files"