Change from pnpm to npm, add ./link.sh shortcut for npm style package linking
[html-minifier.git] / index.html
1 <!DOCTYPE html>
2 <html lang="en">
3   <head>
4     <meta charset="utf-8">
5     <meta http-equiv="X-UA-Compatible" content="IE=edge">
6     <title>HTML minifier</title>
7     <link rel="stylesheet" href="assets/master.css">
8   </head>
9   <body>
10     <div id="outer-wrapper">
11       <div id="wrapper">
12         <h1>HTML Minifier <span>(v3.5.21)</span></h1>
13         <textarea rows="8" cols="40" id="input"></textarea>
14         <div class="minify-button">
15           <button type="button" id="minify-btn">Minify</button>
16         </div>
17         <textarea rows="8" cols="40" id="output" readonly></textarea>
18
19         <p id="stats"></p>
20       </div>
21       <div id="options">
22         <ul>
23           <li>
24             <input type="checkbox" id="caseSensitive">
25             <label for="caseSensitive">
26               Case-sensitive
27             </label>
28             <span class="quiet short">
29               Treat attributes in case sensitive manner (useful for custom HTML tags)
30             </span>
31           </li>
32           <li>
33             <input type="checkbox" id="collapseBooleanAttributes" checked>
34             <label for="collapseBooleanAttributes">
35               Collapse boolean attributes
36             </label>
37             <span class="quiet short">
38               Omit attribute values from boolean attributes
39             </span>
40           </li>
41           <li>
42             <input type="checkbox" id="collapseInlineTagWhitespace">
43             <label for="collapseInlineTagWhitespace" class="unsafe">
44               Collapse inline tag whitespace
45             </label>
46             <span class="quiet short">
47               Don't leave any spaces between <code>display:inline;</code> elements when collapsing.
48               Must be used in conjunction with <code>collapseWhitespace=true</code>
49             </span>
50           </li>
51           <li>
52             <input type="checkbox" id="collapseWhitespace" checked>
53             <label for="collapseWhitespace">
54               Collapse whitespace
55             </label>
56             <span class="quiet short">
57               Collapse white space that contributes to text nodes in a document tree
58             </span>
59           </li>
60           <li>
61             <input type="checkbox" id="conservativeCollapse">
62             <label for="conservativeCollapse">
63               Conservative collapse
64             </label>
65             <span class="quiet short">
66               Always collapse to 1 space (never remove it entirely).
67               Must be used in conjunction with <code>collapseWhitespace=true</code>
68             </span>
69           </li>
70           <li>
71             <input type="checkbox" id="decodeEntities" checked>
72             <label for="decodeEntities">
73               Decode Entity Characters
74             </label>
75             <span class="quiet short">
76               Use direct Unicode characters whenever possible
77             </span>
78           </li>
79           <li>
80             <input type="checkbox" id="html5" checked>
81             <label for="html5">
82               HTML5
83             </label>
84             <span class="quiet short">
85               Parse input according to HTML5 specifications
86             </span>
87           </li>
88           <li>
89             <input type="checkbox" id="includeAutoGeneratedTags">
90             <label for="includeAutoGeneratedTags">
91               Include auto-generated tags
92             </label>
93             <span class="quiet short">
94               Insert tags generated by HTML parser
95             </span>
96           </li>
97           <li>
98             <input type="checkbox" id="keepClosingSlash">
99             <label for="keepClosingSlash">
100               Keep closing slash
101             </label>
102             <span class="quiet short">
103               Keep the trailing slash on singleton elements
104             </span>
105           </li>
106           <li>
107             <label for="maxLineLength">
108               Max. line length
109             </label>
110             <input type="text" id="maxLineLength">
111             <span class="quiet short">
112               Specify a maximum line length. Compressed output will be split by newlines at valid HTML split-points
113             </span>
114           </li>
115           <li>
116             <input type="checkbox" id="minifyCSS" checked>
117             <label for="minifyCSS">
118               Minify CSS
119             </label>
120             <span class="quiet short">
121               Minify CSS in style elements and style attributes (uses <code>clean-css</code>)
122             </span>
123           </li>
124           <li>
125             <input type="checkbox" id="minifyJS" checked>
126             <label for="minifyJS">
127               Minify JavaScript
128             </label>
129             <span class="quiet short">
130               Minify JavaScript in script elements and event attributes (uses <code>UglifyJS</code>)
131             </span>
132           </li>
133           <li>
134             <label for="minifyURLs">
135               Minify URLs
136             </label>
137             <input type="text" id="minifyURLs">
138             <span class="quiet short">
139               Minify URLs in various attributes (uses <code>relateurl</code>)
140             </span>
141           </li>
142           <li>
143             <input type="checkbox" id="preserveLineBreaks">
144             <label for="preserveLineBreaks">
145               Preserve line-breaks
146             </label>
147             <span class="quiet short">
148               Always collapse to 1 line break (never remove it entirely) when whitespace between tags include a line break.
149               Must be used in conjunction with <code>collapseWhitespace=true</code>
150             </span>
151           </li>
152           <li>
153             <input type="checkbox" id="preventAttributesEscaping">
154             <label for="preventAttributesEscaping" class="unsafe">
155               Prevent attributes escaping
156             </label>
157             <span class="quiet short">
158               Prevents the escaping of the values of attributes
159             </span>
160           </li>
161           <li>
162             <input type="checkbox" id="processConditionalComments" checked>
163             <label for="processConditionalComments">
164               Process conditional comments
165             </label>
166             <span class="quiet short">
167               Process contents of conditional comments through minifier
168             </span>
169           </li>
170           <li>
171             <label for="processScripts">
172               Process scripts
173             </label>
174             <input type="text" id="processScripts" value="text/html">
175             <span class="quiet short">
176               Comma-delimited string corresponding to types of script elements to process through minifier (e.g. <code>text/ng-template, text/x-handlebars-template</code>)
177             </span>
178           </li>
179           <li>
180             <label for="quoteCharacter">
181               Quote character
182             </label>
183             <input type="text" id="quoteCharacter">
184             <span class="quiet short">
185               Type of quote to use for attribute values (<code>'</code> or <code>"</code>)
186             </span>
187           </li>
188           <li>
189             <input type="checkbox" id="removeAttributeQuotes" checked>
190             <label for="removeAttributeQuotes">
191               Remove attribute quotes
192             </label>
193             <span class="quiet short">
194               Remove quotes around attributes when possible
195             </span>
196           </li>
197           <li>
198             <input type="checkbox" id="removeComments" checked>
199             <label for="removeComments">
200               Remove comments
201             </label>
202             <span class="quiet short">
203               Strip HTML comments
204             </span>
205           </li>
206           <li>
207             <input type="checkbox" id="removeEmptyAttributes" checked>
208             <label for="removeEmptyAttributes">
209               Remove empty attributes
210             </label>
211             <span class="quiet short">
212               Remove all attributes with whitespace-only values
213             </span>
214           </li>
215           <li>
216             <input type="checkbox" id="removeEmptyElements">
217             <label for="removeEmptyElements" class="unsafe">
218               Remove empty elements
219             </label>
220             <span class="quiet short">
221               Remove all elements with empty contents
222             </span>
223           </li>
224           <li>
225             <input type="checkbox" id="removeOptionalTags" checked>
226             <label for="removeOptionalTags">
227               Remove optional tags
228             </label>
229           </li>
230           <li>
231             <input type="checkbox" id="removeRedundantAttributes" checked>
232             <label for="removeRedundantAttributes">
233               Remove redundant attributes
234             </label>
235             <span class="quiet short">
236               Remove attributes when value matches default.
237             </span>
238           </li>
239           <li>
240             <input type="checkbox" id="removeScriptTypeAttributes" checked>
241             <label for="removeScriptTypeAttributes">
242               Remove script type attributes
243             </label>
244             <span class="quiet short">
245               Remove <code>type="text/javascript"</code> from <code>script</code> tags.
246               Other <code>type</code> attribute values are left intact
247             </span>
248           </li>
249           <li>
250             <input type="checkbox" id="removeStyleLinkTypeAttributes" checked>
251             <label for="removeStyleLinkTypeAttributes">
252               Remove style link type attributes
253             </label>
254             <span class="quiet short">
255               Remove <code>type="text/css"</code> from <code>style</code> and <code>link</code> tags.
256               Other <code>type</code> attribute values are left intact
257             </span>
258           </li>
259           <li>
260             <input type="checkbox" id="removeTagWhitespace" checked>
261             <label for="removeTagWhitespace" class="unsafe">
262               Remove tag whitespace
263             </label>
264             <span class="quiet short">
265               Remove space between attributes whenever possible.
266               <i>Note that this will result in invalid HTML!</i>
267             </span>
268           </li>
269           <li>
270             <input type="checkbox" id="sortAttributes" checked>
271             <label for="sortAttributes" class="unsafe">
272               Sort attributes
273             </label>
274             <span class="quiet short">
275               Sort attributes by frequency
276             </span>
277           </li>
278           <li>
279             <input type="checkbox" id="sortClassName" checked>
280             <label for="sortClassName" class="unsafe">
281               Sort class name
282             </label>
283             <span class="quiet short">
284               Sort style classes by frequency
285             </span>
286           </li>
287           <li>
288             <input type="checkbox" id="trimCustomFragments" checked>
289             <label for="trimCustomFragments">
290               Trim white space around custom fragments
291             </label>
292             <span class="quiet short">
293               Trim white space around <code>ignoreCustomFragments</code>.
294             </span>
295           </li>
296           <li>
297             <input type="checkbox" id="useShortDoctype" checked>
298             <label for="useShortDoctype">
299               Use short <code>doctype</code>
300             </label>
301             <span class="quiet short">
302               Replaces the <code>doctype</code> with the short (HTML5) <code>doctype</code>
303             </span>
304           </li>
305         </ul>
306         <div class="controls">
307           <span>Select:</span>
308           <a href="#" id="select-all">All</a>,
309           <a href="#" id="select-none">None</a>,
310           <a href="#" id="select-defaults">Reset</a>
311         </div>
312       </div>
313     </div>
314
315     <div class="footer">
316       <p class="quiet">
317         HTMLMinifier is made by <a href="http://perfectionkills.com/">kangax</a>,
318         using tweaked version of HTML parser by <a href="http://ejohn.org/">John Resig</a>
319         (which, in its turn, is based on work of <a href="http://erik.eae.net/">Erik Arvidsson</a>).
320         Source and bugtracker are <a href="https://github.com/kangax/html-minifier">hosted on GitHub</a>.
321       </p>
322     </div>
323
324     <script src="dist/htmlminifier.min.js"></script>
325     <script src="assets/master.js"></script>
326   </body>
327 </html>