Made all the arguments for htmlcompressor part of config file. Also added optional additional arguments list in project.properties. Fixes #672

This commit is contained in:
Divya Manian
2012-01-29 11:21:39 -08:00
parent 6a304122b7
commit 2b5f881ecc
3 changed files with 10 additions and 6 deletions

View File

@@ -743,12 +743,7 @@
<fileset dir="${dir.intermediate}/" includes="${page-files}"/>
<arg value="-jar"/>
<arg path="${dir.build.tools}/${tool.htmlcompressor}"/>
<arg line="--preserve-multi-spaces"/>
<arg line="--remove-quotes"/>
<arg line="--compress-js"/>
<arg line="--compress-css"/>
<arg line="--preserve-php"/>
<arg line="--preserve-ssi"/>
<arg line="${tool.htmlcompressor.opts} ${tool.htmlcompressor.opts.extra}"/>
<srcfile/>
<arg value="-o"/>
<mapper type="glob" from="*" to="${basedir}/${dir.publish}/*"/>

View File

@@ -116,5 +116,8 @@ tool.jshint.opts = maxerr=25,eqeqeq=true
tool.jslint.opts = maxerr=25,evil=true,browser=true,eqeqeq=true,immed=true,newcap=true,nomen=true,es5=true,rhino=true,undef=true,white=false,devel=true
tool.csslint.opts =
# Default htmlcompressor Options
tool.htmlcompressor.opts = --remove-quotes --preserve-multi-spaces --compress-js --compress-css --preserve-php --preserve-ssi
# Default hash length
hash.length = 7

View File

@@ -91,6 +91,12 @@ env =
# Override default CSSLint Options (see http://csslint.net/about.html#settings for description of options)
#tool.csslint.opts =
# Override default htmlcompressor options
#tool.htmlcompressor.opts = --remove-quotes --preserve-multi-spaces --compress-js --compress-css --preserve-php --preserve-ssi
# Add optional htmlcompressor options
#tool.htmlcompressor.opts.extra = --simple-bool-attr
# set the hash length used for versioning css and js files.
# valid values are between 1 and 40.
# shorter values use less bytes at the expense of increasing the probability of a hash collision.