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

{
  "context": "Evaluates whether the solution leans on html-minifier to shrink HTML while respecting ignore directives, caller-supplied fragment/comment patterns, and optional trimming around preserved regions. Scoring prioritizes correct configuration of the library over custom parsing.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Uses minify",
      "description": "Invokes html-minifier's `minify` for the core transformation and enables whitespace reduction via options like `collapseWhitespace`, avoiding ad-hoc string compression.",
      "max_score": 25
    },
    {
      "name": "Fragment ignores",
      "description": "Supplies user-provided patterns to `ignoreCustomFragments` so templating placeholders remain byte-for-byte while surrounding markup is minified.",
      "max_score": 25
    },
    {
      "name": "Directive comments",
      "description": "Configures `ignoreCustomComments` to preserve directive or include comments that match caller patterns while letting other comments be removed.",
      "max_score": 20
    },
    {
      "name": "Ignore blocks",
      "description": "Relies on html-minifier's built-in `<!-- htmlmin:ignore -->` block handling (not manual slicing) to leave wrapped sections untouched while minifying around them.",
      "max_score": 15
    },
    {
      "name": "Trim around ignores",
      "description": "When trimming is requested, uses html-minifier's `trimCustomFragments` (paired with `ignoreCustomFragments`) to collapse surrounding whitespace without altering preserved fragments.",
      "max_score": 15
    }
  ]
}

Install with Tessl CLI

npx tessl i tessl/npm-html-minifier

tile.json