Permalink
Browse files

Adds a JSLint validation to the build procedure.

  • Loading branch information...
1 parent 700cb58 commit 5ba8ed80db79ebbc604700a04c63f073e36d5d0c @asual committed Mar 3, 2010
Showing with 5,556 additions and 0 deletions.
  1. +15 −0 build.xml
  2. BIN lib/js.jar
  3. +5,501 −0 lib/jslint.js
  4. +40 −0 lib/rhino.js
View
@@ -36,6 +36,13 @@
<delete includeemptydirs="true">
<fileset dir="${dist.dir}" includes="**/*" />
</delete>
+ <echo message="Validating files..." />
+ <antcall target="validate">
+ <param name="file" value="${src.dir}/${name}" />
+ </antcall>
+ <antcall target="validate">
+ <param name="file" value="${src.dir}/${optimizer}" />
+ </antcall>
<echo message="Copying files..." />
<copy todir="${dist.dir}">
<fileset dir="${src.dir}"/>
@@ -56,6 +63,14 @@
</antcall>
</target>
+ <target name="validate">
+ <java classpath="lib/js.jar"
+ classname="org.mozilla.javascript.tools.shell.Main"
+ failonerror="true" fork="true">
+ <arg line="${lib.dir}/rhino.js ${file}.js" />
+ </java>
+ </target>
+
<target name="process">
<tstamp>
<format property="timestamp" pattern="yyyy-MM-dd HH:mm:ss Z (EEE, dd MMM yyyy)" />
View
Binary file not shown.
Oops, something went wrong.

0 comments on commit 5ba8ed8

Please sign in to comment.