Commit 7acd6bfc authored by Tyrannas's avatar Tyrannas
Browse files

installation automatique des packages

parent c9378a2e
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project name="antModule" default="main" basedir="./"> <project name="antModule" default="main" basedir="./">
<taskdef resource="net/sf/antcontrib/antlib.xml"> <taskdef resource="net/sf/antcontrib/antlib.xml">
<classpath> <classpath>
<pathelement location="lib/ant-contrib.jar"/> <pathelement location="lib/ant-contrib.jar"/>
</classpath> </classpath>
</taskdef> </taskdef>
<property name="node" value="false" ></property> <property name="node" value="false" ></property>
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
</target> </target>
<target name="unZip"> <target name="unZip">
<unzip src="./input/${file}" dest="./input/unziped/" overwrite="false"/> <unzip src="./input/${file}" dest="./input/unziped/" overwrite="false"/>
</target> </target>
<target name="transformation"> <target name="transformation">
...@@ -50,9 +50,10 @@ ...@@ -50,9 +50,10 @@
<mkdir dir="./input/unziped"/> <mkdir dir="./input/unziped"/>
</sequential> </sequential>
</target> </target>
<target name="insertion" if="wantToInsert"> <target name="insertion" if="wantToInsert">
<antcall target="installModules"/>
<exec executable="node" dir="./node"> <exec executable="node" dir="./node">
<arg line="insert.js"/> <arg line="insert.js"/>
</exec> </exec>
...@@ -64,4 +65,19 @@ ...@@ -64,4 +65,19 @@
</condition> </condition>
</target> </target>
<target name="checkModules">
<condition property="modNotInstalled">
<available file="node_modules" type="dir"/>
<target name="installModules" depends="checkModules" if="modNotInstalled">
<echo>"modules non installés"</echo>
<exec executable="npm" dir=".">
<arg line="install"/>
</project> </project>
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment