Created
September 28, 2010 14:23
-
-
Save zefer/601073 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0"?> | |
<project basedir="." default="build"> | |
<taskdef name="jscomp" classname="com.google.javascript.jscomp.ant.CompileTask" classpath="lib/compiler.jar"/> | |
<target name="build" depends="combineJs"> | |
</target> | |
<target name="combineJs"> | |
<!-- combine the javascript into a single uncompressed file --> | |
<concat destfile="../js/all.js"> | |
<filelist dir="../js"> | |
<file name="file1.js"/> | |
<file name="file2.js"/> | |
<file name="file3.js"/> | |
</filelist> | |
</concat> | |
<echo message="concatenated js > all.js."/> | |
<!-- compile/compress using Google Closure --> | |
<jscomp compilationLevel="simple" warning="quiet" debug="false" output="../js/all.min.js"> | |
<sources dir="../js"> | |
<file name="all.js" /> | |
</sources> | |
</jscomp> | |
<echo message="minified js > all.min.js."/> | |
<copy file="../index.dev.html" tofile="../index.html" overwrite="true" /> | |
<replaceregexp file="../index.html" match="<\!-- \[start combine\].*\[end combine\] -->" replace="<script type="text/javascript" src="js/all.min.js"></script>" flags="s" /> | |
<echo message="created index.html using minified js."/> | |
</target> | |
</project> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment