1 <project name="JSmol" default="toJs" basedir=".">
3 <property name="site.path" value="site/swingjs" />
4 <property name="core.name" value="_jalview" />
7 <target name="toJs" id="toJs">
9 <!-- create a NON svn local directory only containing JS files
11 <echo>Deleting the site directory.</echo>
12 <delete quiet="true" dir="site" />
15 <!-- make core files -->
17 <echo>creating and compressing core files - warnings are OK; "does not exist" is trouble</echo>
18 <echo>reading core class list from file coreclasses</echo>
19 <loadresource property="coreclasses">
20 <file file="coreclasses"/>
23 <antcall target="call-core">
24 <param name="call-core.name" value="${core.name}" />
25 <param name="call-core.list" value="
31 <echo>......Now copy an html file in site/ and add core:"core${core.name}", to the Info block.</echo>
36 <target name="call-core" id="call-core">
37 <echo>......Creating core${call-core.name}.js</echo>
38 <concat destfile="${site.path}/js/core/tmp.js">
39 <filelist dir="${site.path}/j2s" files="${call-core.list}" />
42 <replace dir="${site.path}/js/core" includes="tmp.js" token="Clazz." value="Clazz_"/>
43 <replace dir="${site.path}/js/core" includes="tmp.js" token="Clazz__" value="Clazz._"/>
44 <echo>......Generating ${site.path}/j2s/core/core${call-core.name}.js</echo>
45 <concat destfile="${site.path}/j2s/core/core${call-core.name}.js"><filelist dir="${site.path}/js" files="
51 <echo>......Generating ${site.path}/j2s/core/core${call-core.name}.z.js</echo>
52 <java jar="tools/closure_compiler.jar" fork="true" dir="${site.path}/j2s/core" failonerror="false">
53 <arg line="--js core${call-core.name}.js --js_output_file core${call-core.name}.z.js" />
55 <delete quiet="true" file="${site.path}/js/core/tmp.js" />