Permalink
Fetching contributors…
Cannot retrieve contributors at this time
201 lines (159 sloc) 6.32 KB
<project name="WebExtlib" default="WebExtlib" basedir=".">
<property name="dist" value="./demos/js-webshim"/>
<property name="src" value="./src"/>
<property name="shims" value="./src/shims"/>
<taskdef resource="net/sf/antcontrib/antlib.xml">
<classpath>
<pathelement location="build/ant-contrib-1.0b3.jar"/>
</classpath>
</taskdef>
<target name="WebExtlib">
<concat destfile="${src}/shims/combos/1.js">
<fileset file="${src}/shims/es5.js" />
<fileset file="${src}/shims/dom-extend.js" />
</concat>
<concat destfile="${src}/shims/combos/2.js">
<fileset file="${src}/shims/form-core.js" />
<fileset file="${src}/shims/combos/21.js" />
</concat>
<concat destfile="${src}/shims/combos/3.js">
<fileset file="${src}/shims/combos/2.js" />
<fileset file="${src}/shims/form-datalist.js" />
</concat>
<concat destfile="${src}/shims/combos/4.js">
<fileset file="${src}/shims/form-core.js" />
<fileset file="${src}/shims/form-message.js" />
</concat>
<concat destfile="${src}/shims/combos/5.js">
<fileset file="${src}/shims/form-native-extend.js" />
<fileset file="${src}/shims/combos/4.js" />
</concat>
<concat destfile="${src}/shims/combos/6.js">
<fileset file="${src}/shims/form-number-date-api.js" />
<fileset file="${src}/shims/form-number-date-ui.js" />
</concat>
<concat destfile="${src}/shims/combos/7.js">
<fileset file="${src}/shims/form-native-extend.js" />
<fileset file="${src}/shims/combos/6.js" />
</concat>
<concat destfile="${src}/shims/combos/8.js">
<fileset file="${src}/shims/dom-extend.js" />
<fileset file="${src}/shims/mediaelement-core.js" />
</concat>
<concat destfile="${src}/shims/combos/9.js">
<fileset file="${src}/shims/combos/8.js" />
<fileset file="${src}/shims/mediaelement-swf.js" />
</concat>
<concat destfile="${src}/shims/combos/10.js">
<fileset file="${src}/shims/combos/1.js" />
<fileset file="${src}/shims/mediaelement-core.js" />
<fileset file="${src}/shims/mediaelement-swf.js" />
</concat>
<!-- remove if webkit supports datalist -->
<concat destfile="${src}/shims/combos/11.js">
<fileset file="${src}/shims/dom-extend.js" />
<fileset file="${src}/shims/form-datalist.js" />
</concat>
<!-- remove if IE and FF supports details -->
<concat destfile="${src}/shims/combos/12.js">
<fileset file="${src}/shims/combos/8.js" />
<fileset file="${src}/shims/details.js" />
</concat>
<!-- remove if IE and FF supports details -->
<concat destfile="${src}/shims/combos/13.js">
<fileset file="${src}/shims/dom-extend.js" />
<fileset file="${src}/shims/details.js" />
</concat>
<concat destfile="${src}/shims/combos/14.js">
<fileset file="${src}/shims/json-storage.js" />
<fileset file="${src}/shims/geolocation.js" />
</concat>
<concat destfile="${src}/shims/combos/15.js">
<fileset file="${src}/shims/details.js" />
<fileset file="${src}/shims/geolocation.js" />
</concat>
<concat destfile="${src}/shims/combos/16.js">
<fileset file="${src}/shims/combos/8.js" />
<fileset file="${src}/shims/form-core.js" />
</concat>
<concat destfile="${src}/shims/combos/17.js">
<fileset file="${src}/shims/combos/16.js" />
<fileset file="${src}/shims/form-message.js" />
</concat>
<!-- remove if webkit supports datalist -->
<concat destfile="${src}/shims/combos/18.js">
<fileset file="${src}/shims/form-datalist.js" />
<fileset file="${src}/shims/combos/7.js" />
</concat>
<!-- remove if webkit supports datalist -->
<concat destfile="${src}/shims/combos/19.js">
<fileset file="${src}/shims/combos/11.js" />
<fileset file="${src}/shims/form-core.js" />
</concat>
<concat destfile="${src}/shims/combos/20.js">
<fileset file="${src}/shims/mediaelement-core.js" />
<fileset file="${src}/shims/mediaelement-swf.js" />
</concat>
<concat destfile="${src}/shims/combos/21.js">
<fileset file="${src}/shims/form-message.js" />
<fileset file="${src}/shims/form-shim-extend.js" />
<fileset file="${src}/shims/form-output.js" />
</concat>
<concat destfile="${src}/shims/combos/22.js">
<fileset file="${src}/shims/es5.js" />
<fileset file="${src}/shims/combos/20.js" />
</concat>
<concat destfile="${src}/shims/combos/23.js">
<fileset file="${src}/shims/mediaelement-core.js" />
<fileset file="${src}/shims/combos/21.js" />
</concat>
<!-- remove if webkit supports datalist -->
<concat destfile="${src}/shims/combos/24.js">
<fileset file="${src}/shims/combos/19.js" />
<fileset file="${src}/shims/mediaelement-core.js" />
</concat>
<!-- remove if webkit supports datalist -->
<concat destfile="${src}/shims/combos/59.js">
<fileset file="${src}/shims/combos/5.js" />
<fileset file="${src}/shims/form-datalist.js" />
</concat>
<mkdir dir="${dist}" />
<copy todir="${dist}/dev" overwrite="true">
<fileset dir="${src}" />
</copy>
<mkdir dir="${dist}/minified"/>
<copy todir="${dist}/minified" overwrite="true">
<fileset dir="${dist}/dev" />
</copy>
<for param="file">
<path>
<fileset dir="${dist}/minified">
<include name="*.js"/>
</fileset>
<fileset dir="${dist}/minified/shims">
<include name="*.js"/>
</fileset>
<fileset dir="${dist}/minified/extras">
<include name="*.js"/>
</fileset>
<fileset dir="${dist}/minified/shims/combos">
<include name="*.js"/>
</fileset>
<fileset dir="${dist}/minified/shims/i18n">
<include name="*.js"/>
</fileset>
</path>
<sequential>
<java failonerror="true" jar="build/compiler.jar" fork="true">
<arg value="--warning_level"/>
<arg value="QUIET"/>
<arg value="--js"/>
<arg value="@{file}"/>
<arg value="--js_output_file"/>
<arg value="${dist}/minified/foo.js"/>
</java>
<move file="${dist}/minified/foo.js" tofile="@{file}" />
</sequential>
</for>
</target>
</project>