Skip to content

Instantly share code, notes, and snippets.

@nchaulet
Last active December 18, 2015 22:49
Show Gist options
  • Save nchaulet/5857025 to your computer and use it in GitHub Desktop.
Save nchaulet/5857025 to your computer and use it in GitHub Desktop.
timeline Build.xml
<?xml version="1.0" encoding="UTF-8"?>
<project name="timeline" default="build" basedir="../../../">
<!-- ================================================================== -->
<!-- Construction -->
<!-- ================================================================== -->
<target name="build" depends="clean-up, init, checkstyle, tests" />
<!-- =================================================================== -->
<!-- Nettoyage des éléments temporaires -->
<!-- =================================================================== -->
<target name="clean-up"
description="Nettoyage des éléments temporaires et création des répertoires">
<!-- Suppression du répertoire temporaire -->
<delete dir="${basedir}/results"/>
<delete dir="${basedir}/tmp"/>
<!-- Création des répertoires de construction -->
<mkdir dir="${basedir}/results"/>
<mkdir dir="${basedir}/tmp"/>
</target>
<!-- =================================================================== -->
<!-- Init npm -->
<!-- =================================================================== -->
<target name="init" description="Check js_hint">
<exec dir="${basedir}/sources/" executable="npm" failonerror="true">
<arg line=" install" />
</exec>
</target>
<!-- =================================================================== -->
<!-- Vérification de la syntaxe des fichiers js -->
<!-- =================================================================== -->
<target name="checkstyle" description="Check js_hint">
<exec dir="${basedir}/sources/" executable="./node_modules/jshint/bin/jshint" failonerror="false" output="${basedir}/results/jslint.xml">
<arg line=" lib/ --jslint-reporter" />
</exec>
<exec dir="${basedir}/sources/" executable="./node_modules/jshint/bin/jshint" failonerror="false" output="${basedir}/results/checkstyle.xml">
<arg line=" lib/ --checkstyle-reporter" />
</exec>
</target>
<!-- =================================================================== -->
<!-- Lancements des tests -->
<!-- =================================================================== -->
<target name="tests" description="run tests">
<exec dir="${basedir}/sources/" executable="./node_modules/mocha/bin/mocha" failonerror="true">
<arg line=" -R xunit-file" />
</exec>
</target>
</project>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment