GitLab wurde erfolgreich aktualisiert. Durch regelmäßige Updates bleibt das THM GitLab sicher. Danke für Ihre Geduld.

Commit abc3a742 authored by Christoph Thelen's avatar Christoph Thelen

Added targets to minify all js files

parent 3b8c99ef
...@@ -2,21 +2,39 @@ ...@@ -2,21 +2,39 @@
<property name="main.dir" value="src/main/webapp" /> <property name="main.dir" value="src/main/webapp" />
<property name="lib.dir" value="${main.dir}/lib" /> <property name="lib.dir" value="${main.dir}/lib" />
<property name="sencha.dir" value="${lib.dir}/sencha1.1.1" /> <property name="sencha.dir" value="${lib.dir}/sencha1.1.1" />
<property name="build.dir" value="src/main/build" />
<target name="min:js"> <target name="-min:js:minify">
<chmod file="${sencha.dir}/jsbuilder/jsdb/linux/jsdb" perm="+x" /> <apply executable="java" dest="${main.dir}/app">
<exec executable="sh" dir="${sencha.dir}/jsbuilder" failonerror="true"> <arg value="-jar"/>
<arg value="JSBuilder.sh" /> <arg value="${lib.dir}/compiler.jar"/>
<arg value="-p ../ARSnovaCombined.jsb3" /> <arg value="--js"/>
<arg value="-d ../" /> <srcfile/>
<arg value="-v" /> <arg value="--js_output_file"/>
</exec> <targetfile/>
<fileset dir="${main.dir}/app" includes="**/*.js" />
<mapper type="glob" from="*.js" to="*.js.min"/>
</apply>
</target> </target>
<target name="-min:js:move" depends="-min:js:minify">
<move todir="${build.dir}" verbose="true">
<fileset dir="${main.dir}/app">
<include name="**/*.js.min"/>
</fileset>
<mapper type="glob" from="*.min" to="*"/>
</move>
</target>
<target name="min:js" depends="-min:js:move" />
<target name="min:css"> <target name="min:css">
<java jar="${sencha.dir}/jsbuilder/ycompressor/ycompressor.jar" fork="true" failonerror="true" output="${main.dir}/resources/css/arsnova_min.css"> <java jar="${sencha.dir}/jsbuilder/ycompressor/ycompressor.jar" fork="true" failonerror="true" output="${main.dir}/resources/css/arsnova_min.css">
<arg value="${main.dir}/resources/css/arsnova_new.css" /> <arg value="${main.dir}/resources/css/arsnova_new.css" />
</java> </java>
</target> </target>
<target name="run" depends="min:css,min:js" />
</project> </project>
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