1 Star 0 Fork 1

chhw / highcharts

forked from Bowen / highcharts 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
build.xml 52.51 KB
一键复制 编辑 原始数据 按行查看 历史
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939
<?xml version="1.0" encoding="utf-8"?>
<!-- Highcharts build file -->
<project name="build" default="usage" xmlns:ac="antlib:net.sf.antcontrib">
<!-- Describes the usage of the build file by invoking -projecthelp. -->
<target name="usage">
<java classname="org.apache.tools.ant.Main">
<arg value="-projecthelp"/>
<arg value="-quiet"/>
</java>
</target>
<!-- Sets various properties needed during the build. -->
<target name="set.properties">
<!-- Read the release names and versions for our products. -->
<property file="build.properties"/>
<filterset id="highcharts.filter">
<filter token="product.name" value="${highcharts.product.name}"/>
<filter token="product.cdnpath" value="${highcharts.product.cdnpath}"/>
<filter token="product.version" value="${highcharts.product.version}"/>
<filter token="product.date" value="${highcharts.product.date}"/>
</filterset>
<filterset id="highstock.filter">
<filter token="product.name" value="${highstock.product.name}"/>
<filter token="product.cdnpath" value="${highstock.product.cdnpath}"/>
<filter token="product.version" value="${highstock.product.version}"/>
<filter token="product.date" value="${highstock.product.date}"/>
</filterset>
<filterset id="highmaps.filter">
<filter token="product.name" value="${highmaps.product.name}"/>
<filter token="product.cdnpath" value="${highmaps.product.cdnpath}"/>
<filter token="product.version" value="${highmaps.product.version}"/>
<filter token="product.date" value="${highmaps.product.date}"/>
</filterset>
<filterset id="download.builder.filter">
<filter token="product.name" value="${highcharts.product.name} ${highcharts.product.version}"/>
<filter token="product.version" value="/${highstock.product.name} ${highstock.product.version}"/>
<filter token="product.date" value="${highcharts.product.date}"/>
</filterset>
<!-- folder names -->
<property name="tools.dir" value="${basedir}/tools"/>
<property name="build.dir" value="${basedir}/build"/>
<property name="dist.dir" value="${build.dir}/dist"/>
<property name="testoutput.dir" value="${build.dir}/tests"/>
<property name="coveragereport.dir" value="${build.dir}/coverage-report"/>
<property name="themes.dir" value="${basedir}/js/themes"/>
<!-- highcharts/highstock src -->
<property name="highcharts.parts.dir" location="${basedir}/js/parts"/>
<property name="highchartsmore.parts.dir" location="${basedir}/js/parts-more"/>
<property name="highcharts3d.parts.dir" location="${basedir}/js/parts-3d"/>
<property name="highcharts.src.name" value="highcharts.src.js"/>
<property name="highcharts.src.file" value="${basedir}/js/${highcharts.src.name}"/>
<property name="highcharts.minified.name" value="highcharts.js"/>
<property name="highstock.src.name" value="highstock.src.js"/>
<property name="highstock.src.file" value="${basedir}/js/${highstock.src.name}"/>
<property name="highstock.minified.name" value="highstock.js"/>
<property name="highmaps.src.name" value="highmaps.src.js"/>
<property name="highmaps.src.file" value="${basedir}/js/${highmaps.src.name}"/>
<property name="highmaps.minified.name" value="highmaps.js"/>
<property name="highchartsmore.src.name" value="highcharts-more.src.js"/>
<property name="highchartsmore.src.file" value="${basedir}/js/${highchartsmore.src.name}"/>
<property name="highchartsmore.minified.name" value="highcharts-more.js"/>
<property name="highcharts3d.src.name" value="highcharts-3d.src.js"/>
<property name="highcharts3d.src.file" value="${basedir}/js/${highcharts3d.src.name}"/>
<property name="highcharts3d.minified.name" value="highcharts-3d.js"/>
<!--property name="mootools.src.name" value="mootools-adapter.src.js"/>
<property name="prototype.src.name" value="prototype-adapter.src.js"/-->
<property name="standalone.src.name" value="standalone-framework.src.js"/>
<property name="exporting.src.name" value="exporting.src.js"/>
<property name="offline-exporting.src.name" value="offline-exporting.src.js"/>
<property name="boost.src.name" value="boost.src.js"/>
<property name="broken-axis.src.name" value="broken-axis.src.js"/>
<property name="data.src.name" value="data.src.js"/>
<property name="drilldown.src.name" value="drilldown.src.js"/>
<property name="funnel.src.name" value="funnel.src.js"/>
<property name="serieslabel.src.name" value="series-label.src.js"/>
<property name="solidgauge.src.name" value="solid-gauge.src.js"/>
<property name="nodata.src.name" value="no-data-to-display.src.js"/>
<property name="map.src.name" value="map.src.js"/>
<property name="heatmap.src.name" value="heatmap.src.js"/>
<property name="treemap.src.name" value="treemap.src.js"/>
<property name="annotations.src.name" value="annotations.src.js"/>
<!--property name="mootools.minified.name" value="mootools-adapter.js"/>
<property name="prototype.minified.name" value="prototype-adapter.js"/-->
<property name="standalone.minified.name" value="standalone-framework.js"/>
<property name="exporting.minified.name" value="exporting.js"/>
<property name="offline-exporting.minified.name" value="offline-exporting.js"/>
<property name="boost.minified.name" value="boost.js"/>
<property name="broken-axis.minified.name" value="broken-axis.js"/>
<property name="data.minified.name" value="data.js"/>
<property name="drilldown.minified.name" value="drilldown.js"/>
<property name="funnel.minified.name" value="funnel.js"/>
<property name="serieslabel.minified.name" value="series-label.js"/>
<property name="solidgauge.minified.name" value="solid-gauge.js"/>
<property name="nodata.minified.name" value="no-data-to-display.js"/>
<property name="map.minified.name" value="map.js"/>
<property name="heatmap.minified.name" value="heatmap.js"/>
<property name="treemap.minified.name" value="treemap.js"/>
<property name="annotations.minified.name" value="annotations.js"/>
<!--property name="mootools.src.file" value="${basedir}/js/adapters/${mootools.src.name}"/>
<property name="prototype.src.file" value="${basedir}/js/adapters/${prototype.src.name}"/-->
<property name="standalone.src.file" value="${basedir}/js/adapters/${standalone.src.name}"/>
<property name="exporting.src.file" value="${basedir}/js/modules/${exporting.src.name}"/>
<property name="offline-exporting.src.file" value="${basedir}/js/modules/${offline-exporting.src.name}"/>
<property name="boost.src.file" value="${basedir}/js/modules/boost.src.js"/>
<property name="broken-axis.src.file" value="${basedir}/js/modules/broken-axis.src.js"/>
<property name="data.src.file" value="${basedir}/js/modules/${data.src.name}"/>
<property name="drilldown.src.file" value="${basedir}/js/modules/${drilldown.src.name}"/>
<property name="funnel.src.file" value="${basedir}/js/modules/${funnel.src.name}"/>
<property name="overlapping-datalabels.src.file" value="${basedir}/js/modules/overlapping-datalabels.src.js"/>
<property name="serieslabel.src.file" value="${basedir}/js/modules/${serieslabel.src.name}"/>
<property name="solidgauge.src.file" value="${basedir}/js/modules/${solidgauge.src.name}"/>
<property name="nodata.src.file" value="${basedir}/js/modules/${nodata.src.name}"/>
<property name="map.src.file" value="${basedir}/js/modules/${map.src.name}"/>
<property name="heatmap.src.file" value="${basedir}/js/modules/${heatmap.src.name}"/>
<property name="treemap.src.file" value="${basedir}/js/modules/${treemap.src.name}"/>
<property name="annotations.src.file" value="${basedir}/js/modules/${annotations.src.name}"/>
<property name="highstock-all.minified.name" value="highstock-all.js"/>
<!-- jsLint -->
<property name="jslint4java.dir" value="${tools.dir}/jslint4java"/>
<property name="jslint4java.jar" value="${jslint4java.dir}/jslint4java-2.0.0.jar"/>
<taskdef name="jslint"
classname="com.googlecode.jslint4java.ant.JSLintTask"
classpath="${jslint4java.jar}"/>
<!-- google closure compiler -->
<property name="gcc.dir" value="${tools.dir}/google-closure-compiler"/>
<property name="gcc.jar" location="${gcc.dir}/compiler.jar"/>
<!-- google js-test-driver -->
<property name="jstestdriver.dir" value="${tools.dir}/js-test-driver"/>
<property name="jstestdriver.jar" location="${jstestdriver.dir}/JsTestDriver-1.3.5.jar"/>
<!-- ant-contrib -->
<property name="ant.contrib.dir" value="${tools.dir}/ant-contrib-0.6-bin"/>
<property name="ant.contrib.jar" location="${ant.contrib.dir}/lib/ant-contrib-0.6.jar"/>
<taskdef uri="antlib:net.sf.antcontrib" resource="net/sf/antcontrib/antlib.xml" classpath="${ant.contrib.jar}"/>
<!-- cache-control Amamzon S3 -->
<tstamp>
<format property="http.expires.five.years" pattern="E, dd MMM yyyy hh:mm:ss" locale="en,US" offset="1825"/>
</tstamp>
<tstamp>
<format property="http.expires.one.month" pattern="E, dd MMM yyyy hh:mm:ss" locale="en,US" offset="31"/>
</tstamp>
<tstamp>
<format property="http.expires.one.day" pattern="E, dd MMM yyyy hh:mm:ss" locale="en,US" offset="1"/>
</tstamp>
<property name="max.age.five.years" value="157680000"/>
<property name="max.age.one.month" value="2592001"/>
<property name="max.age.one.day" value="86400"/>
<!-- This is the list of files for highcharts -->
<filelist id="highcharts.files" dir="${basedir}/js">
<file name="parts/Intro.js"/>
<file name="parts/Globals.js"/>
<file name="parts/Utilities.js"/>
<file name="parts/Options.js"/>
<file name="parts/Color.js"/>
<file name="parts/SvgRenderer.js"/>
<file name="parts/Html.js"/>
<file name="parts/VmlRenderer.js"/>
<file name="parts/Tick.js"/>
<file name="parts/PlotLineOrBand.js"/>
<file name="parts/Axis.js"/>
<file name="parts/DateTimeAxis.js"/>
<file name="parts/LogarithmicAxis.js"/>
<file name="parts/Tooltip.js"/>
<file name="parts/Pointer.js"/>
<file name="parts/TouchPointer.js"/>
<file name="parts/MSPointer.js"/>
<file name="parts/Legend.js"/>
<file name="parts/Chart.js"/>
<file name="parts/CenteredSeriesMixin.js"/>
<file name="parts/Point.js"/>
<file name="parts/Series.js"/>
<file name="parts/Stacking.js"/>
<file name="parts/Dynamics.js"/>
<file name="parts/LineSeries.js"/>
<file name="parts/AreaSeries.js"/>
<file name="parts/SplineSeries.js"/>
<file name="parts/AreaSplineSeries.js"/>
<file name="parts/ColumnSeries.js"/>
<file name="parts/BarSeries.js"/>
<file name="parts/ScatterSeries.js"/>
<file name="parts/PieSeries.js"/>
<file name="parts/DataLabels.js"/>
<file name="modules/overlapping-datalabels.src.js"/>
<file name="parts/Interaction.js"/>
<file name="parts/Responsive.js"/>
<file name="parts/Facade.js"/>
<file name="parts/Outro.js"/>
</filelist>
<!-- This is the list of files for highstock -->
<filelist id="highstock.files" dir="${basedir}/js">
<file name="parts/Intro.js"/>
<file name="parts/Globals.js"/>
<file name="parts/Utilities.js"/>
<file name="parts/Options.js"/>
<file name="parts/Color.js"/>
<file name="parts/SvgRenderer.js"/>
<file name="parts/Html.js"/>
<file name="parts/VmlRenderer.js"/>
<file name="parts/Tick.js"/>
<file name="parts/PlotLineOrBand.js"/>
<file name="parts/Axis.js"/>
<file name="parts/DateTimeAxis.js"/>
<file name="parts/LogarithmicAxis.js"/>
<file name="parts/Tooltip.js"/>
<file name="parts/Pointer.js"/>
<file name="parts/TouchPointer.js"/>
<file name="parts/MSPointer.js"/>
<file name="parts/Legend.js"/>
<file name="parts/Chart.js"/>
<file name="parts/CenteredSeriesMixin.js"/>
<file name="parts/Point.js"/>
<file name="parts/Series.js"/>
<file name="parts/Stacking.js"/>
<file name="parts/Dynamics.js"/>
<file name="parts/LineSeries.js"/>
<file name="parts/AreaSeries.js"/>
<file name="parts/SplineSeries.js"/>
<file name="parts/AreaSplineSeries.js"/>
<file name="parts/ColumnSeries.js"/>
<file name="parts/BarSeries.js"/>
<file name="parts/ScatterSeries.js"/>
<file name="parts/PieSeries.js"/>
<file name="parts/DataLabels.js"/>
<file name="modules/overlapping-datalabels.src.js"/>
<file name="parts/Interaction.js"/>
<file name="parts/Responsive.js"/>
<!-- Stock -->
<file name="parts/OrdinalAxis.js"/>
<file name="modules/broken-axis.src.js"/>
<file name="parts/DataGrouping.js"/>
<file name="parts/OHLCSeries.js"/>
<file name="parts/CandlestickSeries.js"/>
<file name="parts/FlagsSeries.js"/>
<file name="parts/Scrollbar.js"/>
<file name="parts/Navigator.js"/>
<file name="parts/RangeSelector.js"/>
<file name="parts/StockChart.js"/>
<file name="parts/Facade.js"/>
<file name="parts/Outro.js"/>
</filelist>
<!-- This is the list of files for highcharts-more -->
<filelist id="highchartsmore.files" dir="${highchartsmore.parts.dir}">
<file name="Intro.js"/>
<file name="Pane.js"/>
<file name="RadialAxis.js"/>
<file name="AreaRangeSeries.js"/>
<file name="AreaSplineRangeSeries.js"/>
<file name="ColumnRangeSeries.js"/>
<file name="GaugeSeries.js"/>
<file name="BoxPlotSeries.js"/>
<file name="ErrorBarSeries.js"/>
<file name="WaterfallSeries.js"/>
<file name="PolygonSeries.js"/>
<file name="BubbleSeries.js"/>
<file name="Polar.js"/>
</filelist>
<!-- This is the list of files for highcharts-3d -->
<filelist id="highcharts3d.files" dir="${highcharts3d.parts.dir}">
<file name="Intro.js"/>
<file name="Math.js"/>
<file name="SVGRenderer.js"/>
<file name="Chart.js"/>
<file name="Axis.js"/>
<file name="Column.js"/>
<file name="Pie.js"/>
<file name="Scatter.js"/>
<file name="VMLRenderer.js"/>
</filelist>
<!-- This is the list of files for the maps module -->
<filelist id="maps.files" dir="${basedir}/js">
<file name="parts-map/IntroMapModule.js"/>
<file name="parts-map/MapAxis.js"/>
<file name="parts-map/ColorAxis.js"/>
<file name="parts-map/ColorSeriesMixin.js"/>
<file name="parts-map/MapNavigation.js"/>
<file name="parts-map/MapPointer.js"/>
<file name="parts-map/MapSeries.js"/>
<file name="parts-map/MapLineSeries.js"/>
<file name="parts-map/MapPointSeries.js"/>
<file name="parts-map/MapBubbleSeries.js"/>
<file name="parts-map/HeatmapSeries.js"/>
<file name="parts-map/GeoJSON.js"/>
<file name="parts-map/Map.js"/>
</filelist>
<!-- This is the list of files for the heatmap module -->
<filelist id="heatmap.files" dir="${basedir}/js">
<file name="parts-map/HeatmapIntro.js"/>
<!-- file name="parts-map/HeatmapGlobals.js"/ -->
<!-- file name="parts-map/MapAxis.js"/ -->
<file name="parts-map/ColorAxis.js"/>
<!-- file name="parts-map/MapNavigation.js"/ -->
<!-- file name="parts-map/MapPointer.js"/ -->
<file name="parts-map/ColorSeriesMixin.js"/>
<!-- file name="parts-map/MapSeries.js"/ -->
<!-- file name="parts-map/MapLineSeries.js"/ -->
<!-- file name="parts-map/MapPointSeries.js"/ -->
<!-- file name="parts-map/MapBubbleSeries.js"/ -->
<file name="parts-map/HeatmapSeries.js"/>
<!-- file name="parts-map/Map.js"/ -->
</filelist>
<!-- This is the list of files for Highmaps -->
<filelist id="highmaps.files" dir="${basedir}/js">
<file name="parts-map/Intro.js"/>
<file name="parts/Globals.js"/>
<file name="parts/Utilities.js"/>
<file name="parts/Options.js"/>
<file name="parts/Color.js"/>
<file name="parts/SvgRenderer.js"/>
<file name="parts/Html.js"/>
<file name="parts/VmlRenderer.js"/>
<file name="parts/Tick.js"/>
<!-- file name="parts/Stacking.js"/ -->
<!-- file name="parts/PlotLineOrBand.js"/ -->
<file name="parts/Axis.js"/>
<!-- file name="parts/DateTimeAxis.js"/ -->
<file name="parts/LogarithmicAxis.js"/>
<file name="parts/Tooltip.js"/>
<file name="parts/Pointer.js"/>
<file name="parts/TouchPointer.js"/>
<file name="parts/MSPointer.js"/>
<file name="parts/Legend.js"/>
<file name="parts/Chart.js"/>
<!-- file name="parts/CenteredSeriesMixin.js"/ -->
<file name="parts/Point.js"/>
<file name="parts/Series.js"/>
<file name="parts/Dynamics.js"/>
<file name="parts/LineSeries.js"/>
<!-- file name="parts/AreaSeries.js"/ -->
<!-- file name="parts/SplineSeries.js"/ -->
<!-- file name="parts/AreaSplineSeries.js"/ -->
<file name="parts/ColumnSeries.js"/>
<!-- file name="parts/BarSeries.js"/ -->
<file name="parts/ScatterSeries.js"/>
<!-- file name="parts/PieSeries.js"/ -->
<file name="parts/DataLabels.js"/>
<file name="modules/overlapping-datalabels.src.js"/>
<!-- Maps -->
<file name="parts-map/MapAxis.js"/>
<file name="parts-map/ColorAxis.js"/>
<file name="parts-map/ColorSeriesMixin.js"/>
<file name="parts-map/MapSeries.js"/>
<file name="modules/overlapping-datalabels.src.js"/>
<file name="parts-map/MapNavigation.js"/>
<file name="parts-map/MapPointer.js"/>
<file name="parts-map/MapLineSeries.js"/>
<file name="parts-map/MapPointSeries.js"/>
<file name="parts-more/BubbleSeries.js"/>
<file name="parts-map/MapBubbleSeries.js"/>
<file name="parts-map/GeoJSON.js"/>
<file name="parts-map/Map.js"/>
<file name="parts-map/HeatmapSeries.js"/>
<file name="parts/Interaction.js"/>
<file name="parts/Responsive.js"/>
<!-- Outro -->
<file name="parts/Facade.js"/>
<file name="parts/Outro.js"/>
</filelist>
<!-- Files for the Cloud -->
<filelist id="highstock-all.files" dir="${dist.dir}">
<file name="highstock/js/${highstock.minified.name}"/>
<file name="highstock/js/${highchartsmore.minified.name}"/>
<file name="highstock/js/${highcharts3d.minified.name}"/>
<file name="js/modules/${exporting.minified.name}"/>
<file name="js/modules/${solidgauge.minified.name}"/>
<file name="js/modules/${funnel.minified.name}"/>
<file name="js/modules/${nodata.minified.name}"/>
<file name="js/modules/overlapping-datalabels.js"/>
<file name="js/modules/${data.minified.name}"/>
</filelist>
<!-- Convenience list for modules, used in download builder -->
<filelist id="highcharts-modules.files" dir="${basedir}/js">
<file name="modules/${exporting.src.name}"/>
<file name="modules/${offline-exporting.src.name}"/>
<file name="modules/${data.src.name}"/>
<file name="modules/${drilldown.src.name}"/>
<file name="modules/${nodata.src.name}"/>
<file name="modules/${solidgauge.src.name}"/>
<file name="modules/${funnel.src.name}"/>
</filelist>
</target>
<!-- Builds the source and assembles a distribution package. -->
<target name="dist" depends="set.properties" description="Builds the source and assembles distribution packages.">
<!-- Make sure files in the zip have lf line endings -->
<!-- even if being built on windows -->
<fixcrlf srcdir="${dist.dir}" includes="**/*.js, **/*.html, **/*.htm, **/*.php, **/*.tsv" eol="lf" encoding="UTF-8" />
<!-- 5. Create zip files -->
<zip destfile="${dist.dir}/${highcharts.product.name}-${highcharts.product.version}.zip" basedir="${dist.dir}/highcharts"/>
<zip destfile="${dist.dir}/${highstock.product.name}-${highstock.product.version}.zip" basedir="${dist.dir}/highstock"/>
<zip destfile="${dist.dir}/${highmaps.product.name}-${highmaps.product.version}.zip" basedir="${dist.dir}/highmaps"/>
</target>
<!-- Starts the test driver server. -->
<target name="server" depends="set.properties" description="Starts the unit test server on localhost:4224.">
<!--
<exec executable="cmd" dir="${basedir}" osfamily="windows">
<arg value="/k start java -jar ${jstestdriver.jar} - -port 4224"/>
</exec>
-->
<java jar="${jstestdriver.jar}" fork="true">
<arg value="--port"/>
<arg value="4224"/>
</java>
<echo message="Test server started at localhost:4224"/>
<echo message="Before running tests, remember to capture one or more browsers."/>
<echo message="Exit the server by pressing Control-C in the java window."/>
</target>
<!-- Starts the test driver server with coverage enabled. -->
<!-- This must be done on a separate port to the test-server. -->
<target name="server-coverage" depends="set.properties" description="Starts the unit test server with coverage enabled on localhost:5225.">
<!-- Copy the jsTestDriverCoverage configuration to root. -->
<copy file="test/unit/jsTestDriverCoverage.conf" todir="${basedir}" overwrite="true"/>
<exec executable="cmd" dir="${basedir}" >
<arg value="/k start java -jar ${jstestdriver.jar} --config jsTestDriverCoverage.conf --port 5225"/>
</exec>
<echo message="Coverage test server started at localhost:5225"/>
<echo message="Before running tests, remember to capture one or more browsers."/>
<echo message="Exit the server by pressing Control-C in the java window."/>
</target>
<!-- Runs coverage analysis for the tests. -->
<target name="test-coverage" depends="set.properties" description="Runs the unit tests together with code coverage. The server must be running (i.e. 'server-coverage')">
<!-- Copy the jsTestDriverCoverage configuration to root. -->
<copy file="test/unit/jsTestDriverCoverage.conf" todir="${basedir}" overwrite="true"/>
<!-- Run the tests with coverage enabled. -->
<java jar="${jstestdriver.jar}" fork="true">
<arg value="--config"/>
<arg value="jsTestDriverCoverage.conf"/>
<arg value="--testOutput"/>
<arg value="${testoutput.dir}"/>
<arg value="--tests"/>
<arg value="all"/>
<arg value="--verbose"/>
</java>
</target>
<!-- Generates a code-coverage report based on the output from the 'test-coverage' task. -->
<target name="test-report" depends="set.properties" description="Generates a code-coverage report based on the output from the 'test-coverage' task.">
<!-- When running on windows, the output from coverage is windows-style, but the report requires unix-style paths. -->
<!-- Replace dos-drive 'C:' with unix style '/C'. -->
<replace file="${testoutput.dir}/jsTestDriver.conf-coverage.dat" token="SF:C:" value="SF:/C" summary="true"/>
<!-- Replace dos-paths '\' with unix style '/'. -->
<replace file="${testoutput.dir}/jsTestDriver.conf-coverage.dat" token="\" value="/" summary="true"/>
<!-- Run perl and the genhtml script to create the report. -->
<exec executable="perl" dir="${basedir}">
<arg value="-w"/>
<arg value="tools/lcov-1.9/bin/genhtml"/>
<arg line="-o ${coveragereport.dir} --no-branch-coverage --no-function-coverage --legend --title 'Highcharts test coverage' build/tests/jsTestDriver.conf-coverage.dat"/>
</exec>
<!-- Point the browser to the report. -->
<property name="browser" location="C:/Program Files (x86)/Mozilla Firefox/firefox.exe"/>
<property name="file" location="${coveragereport.dir}/index.html"/>
<exec executable="${browser}" spawn="true">
<arg value="${file}"/>
</exec>
</target>
<!-- gzip javascript files in folder -->
<target name="gzip-js" description="gzip all javascript versions for upload to Amazon S3" depends="set.properties">
<property name="gzip.dir" value="${js.dir}/../js-gzip"/>
<delete dir="${gzip.dir}"/>
<mkdir dir="${gzip.dir}"/>
<echo message="placing zipped folder structure in ${gzip.dir}"/>
<!-- make copy so we don't double-compress files -->
<sync todir="${gzip.dir}" includeEmptyDirs="true" overwrite="true">
<fileset dir="${js.dir}" includes="**/*.js,**/*.css,**/*.map"/>
</sync>
<ac:for param="file">
<path>
<fileset dir="${gzip.dir}"/>
</path>
<sequential>
<!-- we keep the filenames the same and transparently serve gzipped content via http headers -->
<gzip src="@{file}" destfile="@{file}.gz"/>
<move file="@{file}.gz" tofile="@{file}" overwrite="true"/>
</sequential>
</ac:for>
</target>
<target name="put-gzipped-files-to-S3">
<!-- HINT: to upload just the contents, specify the directory with a trailing slash, if you want to upload the whole directory specify the directory without trailing slash -->
<!-- HINT: The sync command will compare checksums and sizes of the remote vs local files and only want to upload those that are new. When using skip-existing only file presence is checked, NOT the content -->
<echo message="synch local folder: ${local} with remote S3 path: ${remote}"/>
<!-- Upload the .js files to remote S3 version folder -->
<!--exec executable="s3cmd" failonerror="true"-->
<exec dir="${s3cmdDir}" executable="python" failonerror="true">
<arg line="s3cmd"/>
<arg value="--guess-mime-type"/>
<arg value="--add-header=Vary:Accept-Encoding"/>
<!-- tell proxies to only serve this compressed content to a client who has the accept-encoding header: http://blog.port80software.com/2005/01/21/; NOT REALLY NECESSARY in our case were only serving gzipped js. But it will maybe help for proxy-servers in transition to only gzipped files -->
<arg value="--add-header=Content-Encoding:gzip"/>
<arg value="--add-header=Cache-Control:public, max-age=${max.age}"/>
<arg value="--add-header=Expires:${http.expires}"/>
<arg value="--encoding=UTF-8"/>
<arg value="--recursive"/>
<arg value="--acl-public"/>
<arg value="--verbose"/>
<arg value="--no-preserve"/>
<!--arg value="-!-dry-run" /-->
<arg value="put"/>
<arg value="${local}"/>
<arg value="${remote}/"/>
</exec>
</target>
<!-- synch all files to S3 recursively, but ommit .js files -->
<target name="put-files-to-S3">
<echo message="synch local folder: ${local} with remote S3 path: ${remote}"/>
<exec dir="${s3cmdDir}" executable="python" failonerror="true">
<arg line="s3cmd"/>
<arg value="--add-header=Cache-Control:public, max-age=${max.age}"/>
<arg value="--add-header=Expires:${http.expires}"/>
<arg value="--guess-mime-type"/>
<arg value="--encoding=UTF-8"/>
<arg value="--recursive"/>
<arg value="--acl-public"/>
<arg value="--no-preserve"/>
<arg value="--exclude=**/*.js"/>
<!--arg value="-!-dry-run" /-->
<arg value="put"/>
<arg value="${local}"/>
<arg value="${remote}/"/>
</exec>
</target>
<target name="put-file-to-S3">
<echo message="copy a file to : ${local} with remote S3 path: ${remote}"/>
<exec dir="${s3cmdDir}" executable="python" failonerror="true">
<arg line="s3cmd"/>
<arg value="--add-header=Cache-Control:public, max-age=${max.age}"/>
<arg value="--add-header=Expires:${http.expires}"/>
<arg value="--guess-mime-type"/>
<arg value="--encoding=UTF-8"/>
<arg value="--acl-public"/>
<arg value="--no-preserve"/>
<!--arg value="-! -exclude=*"/>
<arg value="-!-include=${include.pattern}"/-->
<!--arg value="-!-dry-run" /-->
<arg value="put"/>
<arg value="${local}"/>
<arg value="${remote}/"/>
</exec>
</target>
<target name="copy-folder-on-S3">
<echo message="copy a folders and files from : ${from.s3} to: ${to.s3}"/>
<exec dir="${s3cmdDir}" executable="python" failonerror="true">
<arg line="s3cmd"/>
<arg value="--recursive"/>
<arg value="--guess-mime-type"/>
<arg value="--encoding=UTF-8"/>
<arg value="--acl-public"/>
<arg value="cp"/>
<arg value="${from.s3}"/>
<arg value="${to.s3}/"/>
</exec>
</target>
<target name="put-all-versions-nonjs-files-to-S3">
<!-- This is used to push all versions from local machine to S3 -->
<echo message="synch local folder: ${local} with remote S3 path: ${remote}"/>
<echo message="copying all files and folders other than .js"/>
<exec dir="${s3cmdDir}" executable="python" failonerror="true">
<arg line="s3cmd"/>
<!--arg value="-!-skip-existing" /-->
<arg value="--add-header=Cache-Control:public, max-age=${max.age}"/>
<arg value="--add-header=Expires:${http.expires}"/>
<arg value="--guess-mime-type"/>
<arg value="--encoding=UTF-8"/>
<arg value="--recursive"/>
<arg value="--acl-public"/>
<arg value="--no-preserve"/>
<arg value="--exclude=**/*.js"/>
<arg value="--exclude=*.js"/>
<arg value="--exclude=*.php"/>
<arg value="--exclude=*.htaccess"/>
<!--arg value="-!-dry-run" /-->
<arg value="put"/>
<arg value="${local}"/>
<arg value="${remote}/"/>
</exec>
</target>
<target name="deploy-highcharts" depends="set.properties" description="deploy highcharts distribution to Amazon S3">
<property file="git-ignore-me.properties"/>
<!-- Get Zip file highcharts -->
<copy file="${basedir}/build/dist/Highcharts-${highcharts.product.version}.zip" tofile="${basedir}/build/dist/Highcharts-${highcharts.product.version}.zip"/>
<!-- Upload zip file to S3 -->
<antcall target="put-file-to-S3">
<param name="local" value="${basedir}/build/dist/Highcharts-${highcharts.product.version}.zip"/>
<param name="remote" value="${amazon.s3.bucketname}/zips"/>
<param name="s3cmdDir" value="${s3cmd.dir}"/>
</antcall>
<!-- upload product.js to S3 -->
<antcall target="put-file-to-S3">
<param name="local" value="${basedir}/build/dist/products.js"/>
<param name="remote" value="${amazon.s3.bucketname}"/>
<param name="s3cmdDir" value="${s3cmd.dir}"/>
</antcall>
<antcall target="gzip-js">
<param name="js.dir" value="${basedir}/build/dist/highcharts/code/"/>
</antcall>
<ac:var name="path.var" value=""/>
<ac:for list="${highcharts.product.version}" delimiter="." param="val">
<sequential>
<ac:if>
<length string="${path.var}" length="0"/>
<then>
<ac:var name="path.var" value="@{val}"/>
<!-- copy.version will be used later on, to do a remote copy on S3 -->
<property name="copy.version" value="@{val}"/>
<!-- STEP 1: Copy zipped js/* to ROOT on S3 -->
<antcall target="put-gzipped-files-to-S3">
<param name="local" value="${basedir}/build/dist/highcharts/js-gzip/"/>
<param name="remote" value="${amazon.s3.bucketname}"/>
<param name="s3cmdDir" value="${s3cmd.dir}"/>
<param name="http.expires" value="${http.expires.one.day}"/>
<param name="max.age" value="${max.age.one.day}"/>
</antcall>
<!-- STEP 2: copy gfx folder to ROOT -->
<antcall target="put-files-to-S3">
<param name="local" value="${basedir}/build/dist/highcharts/gfx"/>
<param name="remote" value="${amazon.s3.bucketname}"/>
<param name="s3cmdDir" value="${s3cmd.dir}"/>
<param name="http.expires" value="${http.expires.one.day}"/>
<param name="max.age" value="${max.age.one.day}"/>
</antcall>
<!-- STEP 3: Copy to js/* version [= ${path.var} ] on S3 -->
<antcall target="put-gzipped-files-to-S3">
<param name="local" value="${basedir}/build/dist/highcharts/js-gzip/"/>
<param name="remote" value="${amazon.s3.bucketname}/${path.var}"/>
<param name="s3cmdDir" value="${s3cmd.dir}"/>
<param name="http.expires" value="${http.expires.one.day}"/>
<param name="max.age" value="${max.age.one.day}"/>
</antcall>
<!-- STEP 4: copy gfx folder to version folder on S3-->
<antcall target="put-files-to-S3">
<param name="local" value="${basedir}/build/dist/highcharts/gfx"/>
<param name="remote" value="${amazon.s3.bucketname}/${path.var}"/>
<param name="s3cmdDir" value="${s3cmd.dir}"/>
<param name="http.expires" value="${http.expires.one.day}"/>
<param name="max.age" value="${max.age.one.day}"/>
</antcall>
</then>
<elseif>
<!-- UPLOAD TO S3 FOR A FOLDER WITH 3 DIGITS, for example 2.0.0 -->
<length string="${path.var}" length="3"/>
<then>
<ac:var name="path.var" value="${path.var}.@{val}"/>
<!-- STEP 1: Copy to js/* version [= ${path.var} ] on S3 -->
<antcall target="put-gzipped-files-to-S3">
<param name="local" value="${basedir}/build/dist/highcharts/js-gzip/"/>
<param name="remote" value="${amazon.s3.bucketname}/${path.var}"/>
<param name="s3cmdDir" value="${s3cmd.dir}"/>
<param name="http.expires" value="${http.expires.five.years}"/>
<param name="max.age" value="${max.age.five.years}"/>
</antcall>
<!-- STEP 2: copy gfx folder to version folder on S3-->
<antcall target="put-files-to-S3">
<param name="local" value="${basedir}/build/dist/highcharts/gfx"/>
<param name="remote" value="${amazon.s3.bucketname}/${path.var}"/>
<param name="s3cmdDir" value="${s3cmd.dir}"/>
<param name="http.expires" value="${http.expires.five.years}"/>
<param name="max.age" value="${max.age.five.years}"/>
</antcall>
</then>
</elseif>
<else>
<!-- concatenate version name and assign to path.var-->
<!-- COPY FOLDER ON S3, for example, 2 to 2.1 -->
<ac:var name="path.var" value="${path.var}.@{val}"/>
<antcall target="copy-folder-on-S3">
<param name="from.s3" value="${amazon.s3.bucketname}/${copy.version}/"/>
<param name="to.s3" value="${amazon.s3.bucketname}/${path.var}"/>
<param name="s3cmdDir" value="${s3cmd.dir}"/>
</antcall>
</else>
</ac:if>
</sequential>
</ac:for>
<!-- delete dir="${basedir}/build/dist/highcharts/js-gzip"/ -->
</target>
<!-- Deploy Highstock to S3 -->
<target name="deploy-highstock" depends="set.properties" description="deploy highstock distribution to Amazon S3">
<property file="git-ignore-me.properties"/>
<copy file="${basedir}/build/dist/Highstock-${highstock.product.version}.zip" tofile="${basedir}/build/dist/Highstock-${highstock.product.version}.zip"/>
<antcall target="put-file-to-S3">
<param name="local" value="${basedir}/build/dist/Highstock-${highstock.product.version}.zip"/>
<param name="remote" value="${amazon.s3.bucketname}/zips"/>
<param name="s3cmdDir" value="${s3cmd.dir}"/>
<param name="s3cmdDir" value="${s3cmd.dir}"/>
</antcall>
<antcall target="gzip-js">
<param name="js.dir" value="${basedir}/build/dist/highstock/code/"/>
</antcall>
<ac:var name="path.var" value=""/>
<ac:for list="${highstock.product.version}" delimiter="." param="val">
<sequential>
<ac:if>
<length string="${path.var}" length="0"/>
<then>
<ac:var name="path.var" value="@{val}"/>
<!-- this will be used later to do a remote copy on S3 -->
<property name="copy.version" value="@{val}"/>
<!-- Copy zipped js/* to Root on S3 -->
<antcall target="put-gzipped-files-to-S3">
<param name="local" value="${basedir}/build/dist/highstock/js-gzip/"/>
<param name="remote" value="${amazon.s3.bucketname}/stock"/>
<param name="s3cmdDir" value="${s3cmd.dir}"/>
<param name="http.expires" value="${http.expires.one.day}"/>
<param name="max.age" value="${max.age.one.day}"/>
</antcall>
<!-- copy gfx folder to Root -->
<antcall target="put-files-to-S3">
<param name="local" value="${basedir}/build/dist/highstock/gfx"/>
<param name="remote" value="${amazon.s3.bucketname}/stock"/>
<param name="s3cmdDir" value="${s3cmd.dir}"/>
<param name="http.expires" value="${http.expires.one.day}"/>
<param name="max.age" value="${max.age.one.day}"/>
</antcall>
<!-- Copy to js/* version [= ${path.var} ] on S3 -->
<antcall target="put-gzipped-files-to-S3">
<param name="local" value="${basedir}/build/dist/highstock/js-gzip/"/>
<param name="remote" value="${amazon.s3.bucketname}/stock/${path.var}"/>
<param name="s3cmdDir" value="${s3cmd.dir}"/>
<param name="http.expires" value="${http.expires.one.day}"/>
<param name="max.age" value="${max.age.one.day}"/>
</antcall>
<!-- copy gfx folder to version folder on S3-->
<antcall target="put-files-to-S3">
<param name="local" value="${basedir}/build/dist/highstock/gfx"/>
<param name="remote" value="${amazon.s3.bucketname}/stock/${path.var}"/>
<param name="s3cmdDir" value="${s3cmd.dir}"/>
<param name="http.expires" value="${http.expires.one.day}"/>
<param name="max.age" value="${max.age.one.day}"/>
</antcall>
</then>
<elseif>
<length string="${path.var}" length="3"/>
<then>
<ac:var name="path.var" value="${path.var}.@{val}"/>
<!-- Copy to js/* version [= ${path.var} ] on S3 -->
<antcall target="put-gzipped-files-to-S3">
<param name="local" value="${basedir}/build/dist/highstock/js-gzip/"/>
<param name="remote" value="${amazon.s3.bucketname}/stock/${path.var}"/>
<param name="s3cmdDir" value="${s3cmd.dir}"/>
<param name="http.expires" value="${http.expires.five.years}"/>
<param name="max.age" value="${max.age.five.years}"/>
</antcall>
<!-- copy gfx folder to version folder on S3-->
<antcall target="put-files-to-S3">
<param name="local" value="${basedir}/build/dist/highstock/gfx"/>
<param name="remote" value="${amazon.s3.bucketname}/stock/${path.var}"/>
<param name="s3cmdDir" value="${s3cmd.dir}"/>
<param name="http.expires" value="${http.expires.five.years}"/>
<param name="max.age" value="${max.age.five.years}"/>
</antcall>
</then>
</elseif>
<else>
<!-- concatenate version name and assign to path.var-->
<ac:var name="path.var" value="${path.var}.@{val}"/>
<antcall target="copy-folder-on-S3">
<param name="from.s3" value="${amazon.s3.bucketname}/stock/${copy.version}/"/>
<param name="to.s3" value="${amazon.s3.bucketname}/stock/${path.var}"/>
<param name="s3cmdDir" value="${s3cmd.dir}"/>
</antcall>
</else>
</ac:if>
</sequential>
</ac:for>
<!-- delete dir="${basedir}/build/dist/highstock/js-gzip"/ -->
</target>
<!-- Deploy Highmaps to S3 -->
<target name="deploy-highmaps" depends="set.properties" description="Deploy Highmaps distribution to Amazon S3">
<property file="git-ignore-me.properties"/>
<copy file="${basedir}/build/dist/Highmaps-${highmaps.product.version}.zip" tofile="${basedir}/build/dist/Highmaps-${highmaps.product.version}.zip"/>
<antcall target="put-file-to-S3">
<param name="local" value="${basedir}/build/dist/Highmaps-${highmaps.product.version}.zip"/>
<param name="remote" value="${amazon.s3.bucketname}/zips"/>
<param name="s3cmdDir" value="${s3cmd.dir}"/>
<param name="s3cmdDir" value="${s3cmd.dir}"/>
</antcall>
<antcall target="gzip-js">
<param name="js.dir" value="${basedir}/build/dist/highmaps/code/"/>
</antcall>
<ac:var name="path.var" value=""/>
<ac:for list="${highmaps.product.version}" delimiter="." param="val">
<sequential>
<ac:if>
<length string="${path.var}" length="0"/>
<then>
<ac:var name="path.var" value="@{val}"/>
<!-- this will be used later to do a remote copy on S3 -->
<property name="copy.version" value="@{val}"/>
<!-- Copy zipped js/* to Root on S3 -->
<antcall target="put-gzipped-files-to-S3">
<param name="local" value="${basedir}/build/dist/highmaps/js-gzip/"/>
<param name="remote" value="${amazon.s3.bucketname}/maps"/>
<param name="s3cmdDir" value="${s3cmd.dir}"/>
<param name="http.expires" value="${http.expires.one.day}"/>
<param name="max.age" value="${max.age.one.day}"/>
</antcall>
<!-- copy gfx folder to Root -->
<antcall target="put-files-to-S3">
<param name="local" value="${basedir}/build/dist/highmaps/gfx"/>
<param name="remote" value="${amazon.s3.bucketname}/maps"/>
<param name="s3cmdDir" value="${s3cmd.dir}"/>
<param name="http.expires" value="${http.expires.one.day}"/>
<param name="max.age" value="${max.age.one.day}"/>
</antcall>
<!-- Copy to js/* version [= ${path.var} ] on S3 -->
<antcall target="put-gzipped-files-to-S3">
<param name="local" value="${basedir}/build/dist/highmaps/js-gzip/"/>
<param name="remote" value="${amazon.s3.bucketname}/maps/${path.var}"/>
<param name="s3cmdDir" value="${s3cmd.dir}"/>
<param name="http.expires" value="${http.expires.one.day}"/>
<param name="max.age" value="${max.age.one.day}"/>
</antcall>
<!-- copy gfx folder to version folder on S3-->
<antcall target="put-files-to-S3">
<param name="local" value="${basedir}/build/dist/highmaps/gfx"/>
<param name="remote" value="${amazon.s3.bucketname}/maps/${path.var}"/>
<param name="s3cmdDir" value="${s3cmd.dir}"/>
<param name="http.expires" value="${http.expires.one.day}"/>
<param name="max.age" value="${max.age.one.day}"/>
</antcall>
</then>
<elseif>
<length string="${path.var}" length="3"/>
<then>
<ac:var name="path.var" value="${path.var}.@{val}"/>
<!-- Copy to js/* version [= ${path.var} ] on S3 -->
<antcall target="put-gzipped-files-to-S3">
<param name="local" value="${basedir}/build/dist/highmaps/js-gzip/"/>
<param name="remote" value="${amazon.s3.bucketname}/maps/${path.var}"/>
<param name="s3cmdDir" value="${s3cmd.dir}"/>
<param name="http.expires" value="${http.expires.five.years}"/>
<param name="max.age" value="${max.age.five.years}"/>
</antcall>
<!-- copy gfx folder to version folder on S3-->
<antcall target="put-files-to-S3">
<param name="local" value="${basedir}/build/dist/highmaps/gfx"/>
<param name="remote" value="${amazon.s3.bucketname}/maps/${path.var}"/>
<param name="s3cmdDir" value="${s3cmd.dir}"/>
<param name="http.expires" value="${http.expires.five.years}"/>
<param name="max.age" value="${max.age.five.years}"/>
</antcall>
</then>
</elseif>
<else>
<!-- concatenate version name and assign to path.var-->
<ac:var name="path.var" value="${path.var}.@{val}"/>
<antcall target="copy-folder-on-S3">
<param name="from.s3" value="${amazon.s3.bucketname}/maps/${copy.version}/"/>
<param name="to.s3" value="${amazon.s3.bucketname}/maps/${path.var}"/>
<param name="s3cmdDir" value="${s3cmd.dir}"/>
</antcall>
</else>
</ac:if>
</sequential>
</ac:for>
</target>
<target name="deploy-all">
<antcall target="deploy-highcharts"></antcall>
<antcall target="deploy-highstock"></antcall>
<antcall target="deploy-highmaps"></antcall>
</target>
<!-- push whole versions structure from local machine to Amazon S3 -->
<target name="push-all-versions-to-S3" depends="set.properties">
<property file="git-ignore-me.properties"/>
<!-- copy base folder containing all versions to seperate folder for gzipping *.js files. The user is asked om source directory containing all versions -->
<input message="Please enter which directory you want to gzip, WITHOUT trailing slash!!! :" addproperty="src.versions.dir"/>
<antcall target="gzip-js">
<param name="js.dir" value="${src.versions.dir}"/>
</antcall>
<!-- synch gzipped files and folders to S3, only containing javascript files with *.js -->
<antcall target="put-gzipped-files-to-S3">
<param name="local" value="${src.versions.dir}/../js-gzip/"/>
<param name="remote" value="${amazon.s3.bucketname}"/>
<param name="http.expires" value="${http.expires.one.month}"/>
<param name="max.age" value="${max.age.one.month}"/>
<param name="s3cmdDir" value="${s3cmd.dir}"/>
</antcall>
<!-- synch files and folders containing non-gzipped content -->
<antcall target="put-all-versions-nonjs-files-to-S3">
<param name="local" value="${src.versions.dir}/"/>
<param name="remote" value="${amazon.s3.bucketname}"/>
<param name="s3cmdDir" value="${s3cmd.dir}"/>
<param name="http.expires" value="${http.expires.one.month}"/>
<param name="max.age" value="${max.age.one.month}"/>
</antcall>
<delete dir="${src.versions.dir}/../js-gzip"/>
<echo message="finished!"/>
</target>
<!-- Copy the folders and content of /samples and /studies to higcharts.com.site -->
<target name="copy-to-site" depends="set.properties" description="Copy files from this repo to repository www.highcharts.com">
<property file="git-ignore-me.properties"/>
<copy todir="${highcharts.site.dir}/samples">
<fileset dir="samples"/>
</copy>
<copy todir="${highcharts.site.dir}/studies">
<fileset dir="studies"/>
</copy>
<copy todir="${highcharts.site.dir}/js/themes">
<fileset dir="js/themes"/>
</copy>
<copy todir="${highcharts.site.dir}/errors">
<fileset dir="errors"/>
</copy>
<copy todir="${highcharts.site.dir}/lib">
<fileset dir="vendor"/>
</copy>
</target>
</project>
JavaScript
1
https://gitee.com/chhw/highcharts.git
git@gitee.com:chhw/highcharts.git
chhw
highcharts
highcharts
master

搜索帮助