Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Switch to Google compiler

  • Loading branch information...
commit 5863402333e28ad45c1cb400a478a88beea63312 1 parent 1182b21
@tonytomov authored
Showing with 86 additions and 76 deletions.
  1. +2 −3 build.properties
  2. +84 −73 build.xml
View
5 build.properties 100644 → 100755
@@ -1,3 +1,2 @@
-# Path for the YUICompressor jar file
-#YUICompressor=/home/paolo/ef-dev/cds/tools/js/yuicompressor-2.4.2.jar
-YUICompressor=
+# Path for the Google Compiller jar file
+GoogleCompiler = compiler.jar
View
157 build.xml 100644 → 100755
@@ -1,73 +1,84 @@
-<?xml version="1.0"?>
-<project name="jQgrid" default="build" basedir=".">
-
- <!-- define the path of YUIcompressor in this file -->
- <property file="build.properties" />
-
- <property description="Source Folder" name="srcdir" value="js" />
- <property description="Folder for jquery, min, lite and packed target" name="distdir" value="./dist" />
-
- <!-- Files names for distribution -->
- <property name="jqGrid" value="jquery.jqGrid.js" />
- <property name="jqGrid.min" value="jquery.jqGrid.min.js" />
-
- <target name="init">
- <mkdir dir="${distdir}" />
- </target>
-
- <target name="jqgrid" depends="init">
- <concat destfile="${distdir}/${jqGrid}">
- <fileset dir="${srcdir}">
- <include name="grid.base.js" />
- <include name="grid.common.js" />
- <include name="grid.formedit.js" />
- <include name="grid.inlinedit.js" />
- <include name="grid.celledit.js" />
- <include name="grid.subgrid.js" />
- <include name="grid.treegrid.js" />
- <include name="grid.custom.js" />
- <include name="grid.postext.js" />
- <include name="grid.tbltogrid.js" />
- <include name="grid.setcolumns.js" />
- <include name="grid.import.js" />
- <include name="jquery.fmatter.js" />
- <include name="JsonXml.js" />
- <include name="grid.jqueryui.js" />
- <include name="jquery.searchFilter.js" />
- </fileset>
- </concat>
- </target>
-
- <target name="jqgrid.min" depends="jqgrid">
- <apply executable="java" parallel="false" verbose="true" failonerror="true" dest="${distdir}">
- <fileset dir="${distdir}">
- <include name="${jqGrid}" />
- </fileset>
- <arg line="-jar" />
- <arg path="${YUICompressor}" />
- <arg value="--charset" />
- <arg value="utf-8" />
- <arg value="-o" />
- <targetfile />
- <mapper type="glob" from="${jqGrid}" to="${jqGrid.min}" />
- </apply>
- </target>
-
- <target name="i18n">
- <mkdir dir="${distdir}/i18n" />
- <copy todir="${distdir}/i18n" overwrite="true">
- <fileset dir="${srcdir}/i18n">
- <include name="grid.locale-*.js" />
- </fileset>
- </copy>
- </target>
-
- <target name="build" depends="jqgrid, jqgrid.min, i18n"/>
-
- <target name="clean">
- <delete dir="${distdir}" />
- </target>
-
- <target name="all" depends="clean,build"/>
-
-</project>
+<?xml version="1.0"?>
+<project name="jqGrid" default="build" basedir=".">
+
+ <!-- define the path of compressor in this file -->
+ <property file="build.properties" />
+
+ <property description="Source Folder" name="srcdir" value="js" />
+ <property description="Folder for jquery, min, lite and packed target" name="distdir" value="./dist" />
+
+ <!-- Files names for distribution -->
+ <property name="jqGrid" value="jquery.jqGrid.js" />
+ <property name="jqGrid.min" value="jquery.jqGrid.min.js" />
+
+ <target name="init">
+ <mkdir dir="${distdir}" />
+ </target>
+
+ <target name="jqgrid" depends="init">
+ <concat destfile="${distdir}/${jqGrid}">
+ <fileset dir="${srcdir}">
+ <include name="grid.base.js" />
+ <include name="grid.common.js" />
+ <include name="grid.formedit.js" />
+ <include name="grid.inlinedit.js" />
+ <include name="grid.celledit.js" />
+ <include name="grid.subgrid.js" />
+ <include name="grid.treegrid.js" />
+ <include name="grid.custom.js" />
+ <include name="grid.postext.js" />
+ <include name="grid.tbltogrid.js" />
+ <include name="grid.setcolumns.js" />
+ <include name="grid.import.js" />
+ <include name="jquery.fmatter.js" />
+ <include name="grid.jqueryui.js" />
+ <include name="jquery.searchFilter.js" />
+ <include name="jqDnR.js" />
+ <include name="jqModal.js" />
+ <include name="JsonXml.js" />
+ </fileset>
+ </concat>
+ </target>
+
+ <target name="jqgrid.min" depends="jqgrid">
+ <apply executable="java" parallel="false" verbose="true" failonerror="true" dest="${distdir}">
+ <fileset dir="${distdir}">
+ <include name="${jqGrid}" />
+ </fileset>
+ <arg line="-jar" />
+ <arg path="${GoogleCompiler}" />
+ <arg value="--warning_level" />
+ <arg value="QUIET" />
+ <arg value="--js_output_file" />
+ <targetfile />
+ <arg value="--js" />
+ <mapper type="glob" from="${jqGrid}" to="${jqGrid.min}" />
+ </apply>
+ <concat destfile="${jqGrid.min}">
+ <filelist files="${jqGrid}, ${distdir}"/>
+ </concat>
+ <concat destfile="${jqGrid.min}" append="yes">
+ <filelist files="${distdir}"/>
+ </concat>
+ <delete file="${distdir}"/>
+ <echo message="${jqGrid.min} built." />
+ </target>
+
+ <target name="i18n">
+ <mkdir dir="${distdir}/i18n" />
+ <copy todir="${distdir}/i18n" overwrite="true">
+ <fileset dir="${srcdir}/i18n">
+ <include name="grid.locale-*.js" />
+ </fileset>
+ </copy>
+ </target>
+
+ <target name="build" depends="jqgrid, jqgrid.min, i18n"/>
+
+ <target name="clean">
+ <delete dir="${distdir}" />
+ </target>
+
+ <target name="all" depends="clean,build"/>
+
+</project>
Please sign in to comment.
Something went wrong with that request. Please try again.