Last active
December 12, 2015 09:19
-
-
Save miguelmota/4750373 to your computer and use it in GitHub Desktop.
Ant build to compress HTML files recursively using htmlcompressor-1.5.3.jar. Blog post: http://www.miguelmota.com/blog/ant-task-to-compress-html-files/
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" encoding="UTF-8"?> | |
<project default="compress-html"> | |
<target name="compress-html"> | |
<apply executable="java"> | |
<fileset dir="src" includes="**/*.html"/> | |
<arg value="-jar"/> | |
<arg path="lib/htmlcompressor-1.5.3.jar"/> | |
<arg line="-t html"/> | |
<srcfile/> | |
<arg value="-o"/> | |
<mapper type="glob" from="*" to="compressed/*"/> | |
<targetfile/> | |
</apply> | |
</target> | |
</project> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment