<commit_before><project basedir="." default="compile">

	<taskdef name="jscomp" classname="com.google.javascript.jscomp.ant.CompileTask" classpath="${basedir}/libs/closure-compiler/compiler.jar"/>

	<property name="aria.rdf.url" value="xml/aria-1.rdf"/>
	<property name="src.dir" location="src"/>
	<property name="build.dir" location="build"/>
	<property name="dist.dir" location="dist"/>
	<property name="test.build.dir" location="${build.dir}"/>
	<property name="build.version" value="0.3"/>

	<target name="clean">
		<delete dir="${build.dir}"/>
	</target>

	<target name="build" depends="clean">
		<mkdir dir="${build.dir}/js"/>
		<mkdir dir="${build.dir}/xml"/>
		<concat destfile="${build.dir}/js/aria-${build.version}-debug.js" fixlastline="true">
			<header>
				<![CDATA[
/**
 * ARIA-js
 * Copyright 2011, <NAME>
 */
(function(){"use strict";
var scope = this || window;
scope.ARIA = new ARIA({query:query, loadXml:loadXml, url: "${aria.rdf.url}"});
scope = null;
				]]>
			</header>
			<footer>})();</footer>
			<fileset dir="${src.dir}/main/js" includes="*.js" excludes="*.validator.js"/>
		</concat>
		<xslt style="${src.dir}/main/xslt/aria-minifier.xsl" in="libs/aria/aria-1.rdf" out="${build.dir}/xml/aria-1.rdf"/>
		<copy file="${src.dir}/main/js/aria.validator.js" tofile="${build.dir}/js/aria.validator-${build.version}-debug.js"/>
		<copy file="LICENSE" todir="${build.dir}"/>
		<copy file="README" todir="${build.dir}"/>
	</target>
	
	<target name="test" depends="compile" description="Build tests for the project">
		<mkdir dir="${test.build.dir}"/>
		<copy file="${src.dir}/test/aria-test.html" todir="${test.build.dir}">
			<filterchain>
				<expandproperties/>
			</filterchain>
		</copy>
	</target>
	
	<target name="dist" depends="compile" description="Builds the tarball for distribution">
		<mkdir dir="${dist.dir}"/>
		<tar destfile="${dist.dir}/aria-toolkit-${build.version}.tar" basedir="${build.dir}"/>
		<!--gzip destfile="${dist.dir}/aria-toolkit.tar.gz" src="${dist.dir}/aria-toolkit-${build.version}.tar"/-->
	</target>

	<target name="compile" depends="build" description="Build and minify the project">
		<jscomp compilationLevel="simple" debug="false" output="${build.dir}/js/aria-${build.version}.js">
			<sources dir="${build.dir}/js">
				<file name="aria-${build.version}-debug.js"/>
			</sources>
		</jscomp>
		<jscomp compilationLevel="simple" debug="false" output="${build.dir}/js/aria.validator-${build.version}.js">
			<sources dir="${build.dir}/js">
				<file name="aria.validator-${build.version}-debug.js"/>
			</sources><commit_msg>Updated to support browser extension<commit_after><project basedir="." default="compile">

	<taskdef name="jscomp" classname="com.google.javascript.jscomp.ant.CompileTask" classpath="${basedir}/libs/closure-compiler/compiler.jar"/>

	<property name="aria.rdf.url" value="xml/aria-1.rdf"/>
	<property name="src.dir" location="src"/>
	<property name="build.dir" location="build"/>
	<property name="dist.dir" location="dist"/>
	<property name="test.build.dir" location="${build.dir}"/>
	<property name="build.version" value="0.4"/>
	<property name="chrome-ext-dir-name" value="chrome-ext"/>

	<target name="clean">
		<delete dir="${build.dir}"/>
	</target>

	<target name="build" depends="clean">
		<mkdir dir="${build.dir}/js"/>
		<mkdir dir="${build.dir}/xml"/>
		<concat destfile="${build.dir}/js/aria-${build.version}-debug.js" fixlastline="true">
			<header>
				<![CDATA[
/**
 * ARIA-js
 * Copyright 2014, <NAME>
 */
(function(){"use strict";
var scope = this || window;
scope.ARIA = new ARIA({query:query, loadXml:loadXml, url: "${aria.rdf.url}"});
scope = null;
				]]>
			</header>
			<footer>})();</footer>
			<fileset dir="${src.dir}/main/js" includes="*.js" excludes="*.validator.js"/>
		</concat>
		<xslt style="${src.dir}/main/xslt/aria-minifier.xsl" in="libs/aria/aria-1.rdf" out="${build.dir}/xml/aria-1.rdf"/>
		<copy file="${src.dir}/main/js/aria.validator.js" tofile="${build.dir}/js/aria.validator-${build.version}-debug.js"/>
		<copy file="LICENSE" todir="${build.dir}"/>
		<copy file="README" todir="${build.dir}"/>
	</target>

	<target name="buildChromeExt" depends="compile">
		<property name="chromeExtDistDir" location="${build.dir}/${chrome-ext-dir-name}"/>
		<mkdir dir="${chromeExtDistDir}"/>

		<fileset dir="${src.dir}/main/js" includes="*.js" excludes="*.validator.js"/>
		<copy todir="${chromeExtDistDir}">
			<fileset dir="${build.dir}">
				<exclude name="**/*-debug.js"/>
				<include name="**/*.rdf"/>
				<include name="**/*.js"/>
			</fileset>
		</copy>
		<copy todir="${chromeExtDistDir}">
			<fileset dir="${src.dir}/main/${chrome-ext-dir-name}">
				<exclude name="*.js"/>
				<exclude name="*.png"/>
				<include name="*"/>
			</fileset>
			<filterchain>
				<expandproperties />
			</filterchain>
		</copy>
		<copy todir="${chromeExtDistDir}">
			<fileset dir="${src.dir}/main/${chrome-ext-dir-name}">
				<include name="*.png"/>
			</fileset>
		</copy>
		<!-- TODO probably going to need a debug build option with copy instead of compile -->
		<jscomp compilationLevel="simple" debug="false" output="${chromeExtDistDir}/background.js">
			<sources dir="${src.dir}/main/${chrome-ext-dir-name}">
				<file name="background.js"/>
			</sources>
		</jscomp>
		<jscomp compilationLevel="simple" debug="false" output="${chromeExtDistDir}/contentscript.js">
			<sources dir="${src.dir}/main/${chrome-ext-dir-name}">
				<file name="contentscript.js"/>
			</sources>
		</jscomp>
		<jscomp compilationLevel="simple" debug="false" output="${chromeExtDistDir}/summary.js">
			<sources dir="${src.dir}/main/${chrome-ext-dir-name}">
				<file name="summary.js"/>
			</sources>
		</jscomp>
		<zip destfile="${build.dir}/aria-validator-chrome.zip" basedir="${chromeExtDistDir}"/>
	</target>

	<target name="test" depends="compile" description="Build tests for the project">
		<mkdir dir="${test.build.dir}"/>
		<copy file="${src.dir}/test/aria-test.html" todir="${test.build.dir}">
			<filterchain>
				<expandproperties/>
			</filterchain>
		</copy>
	</target>

	<target name="dist" depends="compile" description="Builds the tarball for distribution">
		<mkdir dir="${dist.dir}"/>
		<tar destfile="${dist.dir}/aria-toolkit-${build.version}.tar" basedir="${build.dir}"/>
		<!--gzip destfile="${dist.dir}/aria-toolkit.tar.gz" src="${dist.dir}/aria-toolkit-${build.version}.tar"/-->
	</target>

	<target name="compile" depends="build" description="Build and minify the project">
		<jscomp compilationLevel="simple" debug="false" output="${build.dir}/js/aria-${build.version}.js">
			<sources dir="${build.dir}/js">
				<file name="aria-${build.version}-debug.js"/>
			</sources>
		</jscomp>
		<jscomp compilationLevel="simple" debug="false" output="${build.dir}/js/aria.validator-${build.version}.js">
			<sources dir="${build.dir}/js">
				<file name="aria.validator-${build.version}-debug.js"/>
			</sources>
{'fraction_non_alphanumeric': 0.23550672256758712, 'fraction_numerical': 0.002602284227266156, 'mean_word_length': 4.741078838174274, 'pattern_counts': {'":': 0, '<': 150, '<?xml version=': 0, '>': 150, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 6}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3242779', 'n_tokens_mistral': 2563, 'n_tokens_neox': 2336, 'n_words': 387}