CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/npm-html-minifier

Highly configurable, well-tested, JavaScript-based HTML minifier with extensive optimization options

86

1.17x
Overview
Eval results
Files

rubric.jsonevals/scenario-3/

{
  "context": "Evaluates how the solution leverages html-minifier's programmatic API to apply whitespace/comment removal, attribute pruning, markup simplification, and inline asset compression as defined in the spec toggles.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Whitespace & comments",
      "description": "Invokes html-minifier's `minify` with `collapseWhitespace` and `removeComments` enabled whenever the collapse step is active, yielding the condensed `<div><span>Hi there</span></div>` style output.",
      "max_score": 25
    },
    {
      "name": "Attribute pruning",
      "description": "Configures `removeRedundantAttributes` and `collapseBooleanAttributes` (and, if needed, `removeAttributeQuotes`) so default button type and boolean attributes shrink to `<button disabled>` in the optimized output.",
      "max_score": 20
    },
    {
      "name": "Doctype & voids",
      "description": "Uses `useShortDoctype` plus `removeOptionalTags`/`keepClosingSlash` settings to rewrite legacy doctypes to `<!doctype html>` and drop self-closing slashes for void elements in the framing step.",
      "max_score": 20
    },
    {
      "name": "Embedded assets",
      "description": "Enables `minifyCSS` and `minifyJS` (with any needed custom minifier hooks) to compress inline `<style>` and `<script>` blocks and event handlers when the compressAssets flag is on.",
      "max_score": 25
    },
    {
      "name": "Flag mapping",
      "description": "Maps `collapse`, `simplifyDoctype`, and `compressAssets` inputs directly to the corresponding html-minifier options rather than reimplementing transformations manually.",
      "max_score": 10
    }
  ]
}

Install with Tessl CLI

npx tessl i tessl/npm-html-minifier

tile.json