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-2/

{
  "context": "Evaluates whether the solution configures html-minifier to shrink HTML by collapsing whitespace while honoring comment and fragment preservation switches tied to the problem spec. Confirms the chosen options let callers preserve preformatted or custom regions when requested.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Minify call",
      "description": "Uses html-minifier's `minify` function rather than hand-written regex/string tricks, passing all whitespace/comment options through a single call.",
      "max_score": 25
    },
    {
      "name": "Whitespace options",
      "description": "Enables whitespace reduction via `collapseWhitespace:true` with `conservativeCollapse:true` (or equivalent combo) to shrink inter-tag whitespace while keeping inline text spacing sane.",
      "max_score": 25
    },
    {
      "name": "Comment control",
      "description": "Toggles `removeComments` based on flags and preserves conditional comments using `ignoreCustomComments` or `processConditionalComments:false`; honors a full opt-out by leaving `removeComments` false when keep-all is requested.",
      "max_score": 30
    },
    {
      "name": "Fragment ignores",
      "description": "Uses `ignoreCustomFragments` (e.g., regex for <template> or other requested tags) to skip collapsing inside caller-specified preserved regions while allowing minification elsewhere.",
      "max_score": 20
    }
  ]
}

Install with Tessl CLI

npx tessl i tessl/npm-html-minifier

tile.json