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

{
  "context": "Evaluates how the solution leverages html-minifier to perform attribute-only cleanup: removing empty/default attributes, collapsing boolean attributes, and normalizing quotes while leaving structure/content untouched.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Uses html-minifier",
      "description": "Imports and calls html-minifier's minify API to perform the cleanup instead of manual string manipulation, wiring options through the exposed function.",
      "max_score": 20
    },
    {
      "name": "Empty/default removal",
      "description": "Configures html-minifier with removeEmptyAttributes (and removeRedundantAttributes/removeScriptTypeAttributes/removeStyleLinkTypeAttributes) so empty attributes and default script/style type declarations are stripped as required.",
      "max_score": 25
    },
    {
      "name": "Boolean collapse",
      "description": "Enables collapseBooleanAttributes to ensure boolean attributes drop duplicated values (e.g., disabled=\"disabled\" -> disabled) while keeping non-boolean attributes unchanged.",
      "max_score": 20
    },
    {
      "name": "Quote handling",
      "description": "Uses removeAttributeQuotes plus quoteCharacter/quoteStyle controls so unnecessary quotes are removed but values containing spaces or special characters remain quoted, matching the normalization requirement.",
      "max_score": 20
    },
    {
      "name": "Attribute-only scope",
      "description": "Sets html-minifier options to avoid unrelated transformations (e.g., collapseWhitespace, minifyJS/CSS, removeComments), keeping tag order and content intact while applying only attribute cleanup.",
      "max_score": 15
    }
  ]
}

Install with Tessl CLI

npx tessl i tessl/npm-html-minifier

tile.json