<target name="toJs" id="toJs">
<!-- sensible defaults for default target -->
- <property name="site.path" value="site/swingjs" />
+ <property name="site" value="site"/>
+ <property name="site.path" value="${site}/swingjs" />
<property name="core.name" value="_jalview" />
<property name="classlist"
description="Class list .txt generated by java2script classloader to be bundled into corefile - default is _j2sclasslist.txt"
<!-- make core files -->
- <echo>creating and compressing core files - warnings are OK; "does not exist" is trouble</echo>
- <echo>reading core class list from file coreclasses</echo>
+ <echo>Building core file '${core.name}' - warnings are OK; "does not exist" is trouble</echo>
+ <echo>Reading core class list from file ${classlist}</echo>
<loadresource property="coreclasses">
<file file="${classlist}"/>
</loadresource>
${coreclasses}
" />
</antcall>
+ <antcall target="publish-core-template"/>
+ </target>
+
+ <target name="publish-core-template" id="publish-core-template" description="Creates a new file ${template.name}_${core.name} from ${template.html} in ${site} which include core file ${core.name} in the Info block">
+ <!-- TODO: extend to process all html templates -->
+ <property name="template.html" value="jalview_bin_Jalview.html"/>
+ <property name="template.name" value="JalviewJS"/>
- <echo>......Now copy an html file in site/ and add core:"${core.name}", to the Info block.</echo>
- <copy file="site/jalview_bin_Jalview.html" tofile="site/JalviewJS_${core.name}.html"/>
- <replace token="NONE" value="${core.name}" file="site/JalviewJS_${core.name}.html"/>
+ <echo>......Now copying ${site}/${template.html} as ${$template.name}_${core.name}.html with core:"${core.name}", added to the Info block.</echo>
+ <copy file="${site}/${template.html}" tofile="${site}/${template.name}_${core.name}.html"/>
+ <replace token="NONE" value="${core.name}" file="${site}/${template.name}_${core.name}.html"/>
</target>