<project name="SpludoCore" default="" basedir=".">
    <!-- This file is part of the Spludo Framework. -->
    <!-- Copyright (c) 2009-2010 DracoBlue, http://dracoblue.net/ -->
    <!-- -->
    <!-- Licensed under the terms of MIT License. For the full copyright and license -->
    <!-- information, please see the LICENSE file in the root folder. -->

    <property file="build.properties" />
	
    <description>
        Spludo Core Build-Targets, should be included in a project specific build.xml!
    </description>
    
    <target name="core-test" description="Execute the core tests">
        <exec executable="bash" dir="${spludo.directory}/spludotests">
            <arg line="-c &quot;vows -spec&quot;" />
        </exec>
    </target>
    
    <target name="core-test-xml" description="Execute the core tests (with xml output)">
        <mkdir dir="${build}/core" />
        <exec executable="bash" dir="${spludo.directory}/spludotests">
            <arg line="-c &quot;vows --xunit > ${build}/core/test_results.xml &quot;" />
        </exec>
    </target>
    
    
    <target name="core-lint-xml" description="Execute jslint on the spludo core (with xml output)">
        <mkdir dir="${build}/core" />
        <exec executable="bash" dir="${spludo.directory}">
            <arg line="-c &quot;jshint core/*.js core/server/*.js core/console core/storage core/database core/test --config build/jshint.conf --jslint-reporter > ${build}/core/jslint_report.xml &quot;" />
        </exec>
    </target>

    <target name="core-lint" description="Execute jslint on the spludo core">
        <exec executable="bash" dir="${spludo.directory}">
            <arg line="-c &quot;jshint core/*.js core/server/*.js core/console core/storage core/database core/test --config build/jshint.conf &quot;" />
        </exec>
    </target>

    <target name="core-api" description="Generate the spludo core api">
        <mkdir dir="${build}/core/api" />
        <exec executable="java" dir="${spludo.directory}">
            <arg
                line="-jar ${jsdoctoolkit.directory}/jsrun.jar ${jsdoctoolkit.directory}/app/run.js -p -a -t=${jsdoctoolkit.directory}/templates/jsdoc -d=${build}/core/api core/ core/server core/console core/test core/database" />
        </exec>
    </target>
    
    <target name="core-clean" description="Clean the spludo core build folder">
        <delete dir="${build}/core"/>
    </target>
</project>
