Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
87 lines (72 sloc) 3.09 KB
<project name="Parser Lib" default="all">
<!-- the directories containing the source files -->
<property name="src.dir" value="./src" />
<!-- the directories and files to output to -->
<property name="build.dir" value="./build" />
<!-- output filenames -->
<property name="full.build.file" value="parserlib.js"/>
<property name="core.build.file" value="parserlib-core.js"/>
<property name="css.build.file" value="parserlib-css.js"/>
<loadfile property="license.text" srcfile="LICENSE" />
<!-- build the full library -->
<target name="build.full" depends="build.core,build.css">
<concat destfile="${build.dir}/${full.build.file}" fixlastline="true">
<filelist dir="${build.dir}" files="${core.build.file}, ${css.build.file}"/>
</concat>
</target>
<!-- build the core library -->
<target name="build.core">
<concat destfile="${build.dir}/${core.build.file}" fixlastline="true">
<header trimleading="yes">/*
${license.text}
*/
var parserlib = {};
(function(){
</header>
<!--<filelist dir="${src.dir}/util" files="EventTarget.js, StringReader.js, TokenStream.js"/> -->
<fileset dir="${src.dir}/util" includes="*.js" />
<footer trimleading="yes">
parserlib.util = {
StringReader: StringReader,
SyntaxError : SyntaxError,
SyntaxUnit : SyntaxUnit,
EventTarget : EventTarget,
TokenStream : TokenStream
};
})();
</footer>
</concat>
</target>
<!-- build the CSS library -->
<target name="build.css">
<concat destfile="${build.dir}/${css.build.file}" fixlastline="true">
<header trimleading="yes">/*
${license.text}
*/
(function(){
var TokenStream = parserlib.util.TokenStream,
EventTarget = parserlib.util.EventTarget,
SyntaxError = parserlib.util.SyntaxError,
SyntaxUnit = parserlib.util.SyntaxUnit;
</header>
<!--<filelist dir="${src.dir}/css" files="CSSTokens.js, CSSSelectorUnit.js, CSSColors.js, CSSValueUnit.js, CSSParser.js"/>-->
<fileset dir="${src.dir}/css" includes="*.js" />
<footer trimleading="yes">
parserlib.css = {
Colors :Colors,
Combinator :Combinator,
Parser :Parser,
PropertyName :PropertyName,
PropertyValue :PropertyValue,
Selector :Selector,
SelectorPart :SelectorPart,
SelectorSubPart :SelectorSubPart,
Tokens :Tokens
};
})();
</footer>
</concat>
</target>
<!-- Build all files -->
<target name="all" depends="build.full"/>
</project>