AndersDJohnson / AndersDJohnson/htmlcompressor

Unable to use closure

Ouverte
#91 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
auto-migrated Priority-Medium Type-Defect
Langage dominant
Java
Étoiles
1
Forks
0
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

```
I am using the latest version of all scripts (2014-02-16). However, the closure
options are not yielding anything. Am I doing something wrong? Or is this a
htmlcompressor bug

Files:
-rw-r----- 1 bharath bharath 6.4M Feb 16 18:36 compiler.jar
-rwxrw-r-- 1 bharath bharath 68K Mar 6 2012 htmlcompressor-1.5.3.jar
-rwxrw-r-- 1 bharath bharath 153K Mar 6 2012 htmlcompressor-1.5.3-javadoc.jar
-rwxrw-r-- 1 bharath bharath 16K Mar 6 2012 htmlcompressor-1.5.3-site.jar
-rwxrw-r-- 1 bharath bharath 50K Mar 6 2012 htmlcompressor-1.5.3-sources.jar
-rwxrw-r-- 1 bharath bharath 27K Mar 6 2012
htmlcompressor-1.5.3-test-javadoc.jar
-rwxrw-r-- 1 bharath bharath 16K Mar 6 2012
htmlcompressor-1.5.3-test-sources.jar
-rw-rw-r-- 1 bharath bharath 770K Jul 18 2013 yuicompressor-2.4.8.jar

Command:
java -jar htmlcompressor-1.5.3.jar --compress-js --compress-css --js-compressor
yui --closure-opt-level advanced -a ../../www/index.full.php

Output:

================================================================================
Setting | Incremental Gain | Total Gain | Page Size |
================================================================================
Compression disabled | 0 (0.0%) | 0 (0.0%) | 23,246 |
All settings disabled | 7 (0.0%) | 7 (0.0%) | 23,239 |
Comments removed | 900 (3.9%) | 907 (3.9%) | 22,339 |
Multiple spaces removed | 3,114 (13.9%) | 4,021 (17.3%) | 19,225 |
No spaces between tags | 143 (0.7%) | 4,164 (17.9%) | 19,082 |
No surround spaces (min) | 8 (0.0%) | 4,172 (17.9%) | 19,074 |
No surround spaces (max) | 0 (0.0%) | 4,172 (17.9%) | 19,074 |
No surround spaces (all) | 13 (0.1%) | 4,185 (18.0%) | 19,061 |
Quotes removed from tags | 125 (0.7%) | 4,310 (18.5%) | 18,936 |
attr. removed | 46 (0.2%) | 4,356 (18.7%) | 18,890 |
attr. removed | 0 (0.0%) | 4,356 (18.7%) | 18,890 |
<script> attr. removed | 92 (0.5%) | 4,448 (19.1%) | 18,798 |
<form> attr. removed | 0 (0.0%) | 4,448 (19.1%) | 18,798 |
<input> attr. removed | 0 (0.0%) | 4,448 (19.1%) | 18,798 |
Simple boolean attributes | 0 (0.0%) | 4,448 (19.1%) | 18,798 |
Simple doctype | 0 (0.0%) | 4,448 (19.1%) | 18,798 |
Remove js pseudo-protocol | 0 (0.0%) | 4,448 (19.1%) | 18,798 |
Remove http protocol | 30 (0.2%) | 4,478 (19.3%) | 18,768 |
Remove https protocol | 48 (0.3%) | 4,526 (19.5%) | 18,720 |
Compress inline CSS (YUI) | 192 (1.0%) | 4,718 (20.3%) | 18,528 |
Compress inline JS (YUI) | 1,499 (8.1%) | 6,217 (26.7%) | 17,029 |
================================================================================

Each consecutive compressor setting is applied on top of previous ones.
In order to see JS and CSS compression results, YUI jar file must be present.
All sizes are in bytes.

Command:
java -jar htmlcompressor-1.5.3.jar --compress-js --compress-css --js-compressor
closure --closure-opt-level advanced -a ../../www/index.full.php

Output:

================================================================================
Setting | Incremental Gain | Total Gain | Page Size |
================================================================================
Compression disabled | 0 (0.0%) | 0 (0.0%) | 23,246 |
All settings disabled | 7 (0.0%) | 7 (0.0%) | 23,239 |
Comments removed | 900 (3.9%) | 907 (3.9%) | 22,339 |
Multiple spaces removed | 3,114 (13.9%) | 4,021 (17.3%) | 19,225 |
No spaces between tags | 143 (0.7%) | 4,164 (17.9%) | 19,082 |
No surround spaces (min) | 8 (0.0%) | 4,172 (17.9%) | 19,074 |
No surround spaces (max) | 0 (0.0%) | 4,172 (17.9%) | 19,074 |
No surround spaces (all) | 13 (0.1%) | 4,185 (18.0%) | 19,061 |
Quotes removed from tags | 125 (0.7%) | 4,310 (18.5%) | 18,936 |
<link> attr. removed | 46 (0.2%) | 4,356 (18.7%) | 18,890 |
<style> attr. removed | 0 (0.0%) | 4,356 (18.7%) | 18,890 |
<script> attr. removed | 92 (0.5%) | 4,448 (19.1%) | 18,798 |
<form> attr. removed | 0 (0.0%) | 4,448 (19.1%) | 18,798 |
<input> attr. removed | 0 (0.0%) | 4,448 (19.1%) | 18,798 |
Simple boolean attributes | 0 (0.0%) | 4,448 (19.1%) | 18,798 |
Simple doctype | 0 (0.0%) | 4,448 (19.1%) | 18,798 |
Remove js pseudo-protocol | 0 (0.0%) | 4,448 (19.1%) | 18,798 |
Remove http protocol | 30 (0.2%) | 4,478 (19.3%) | 18,768 |
Remove https protocol | 48 (0.3%) | 4,526 (19.5%) | 18,720 |
Compress inline CSS (YUI) | 192 (1.0%) | 4,718 (20.3%) | 18,528 |
Compress JS (Closure) | - | - | - |
================================================================================

Each consecutive compressor setting is applied on top of previous ones.
In order to see JS and CSS compression results, YUI jar file must be present.
All sizes are in bytes.
```

Original issue reported on code.google.com by `lord....@gmail.com` on 16 Feb 2014 at 6:52

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.