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

{
  "context": "Evaluates whether the solution leverages html-minifier to shrink inline CSS and JavaScript while preserving templating fragments and skipping non-JS script blocks. Checks focus purely on correct optioning of the library's programmatic API to achieve the spec behaviors.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Minify call",
      "description": "Uses html-minifier's programmatic minify function as the core transformation rather than manual string mangling, wiring options for inline assets.",
      "max_score": 20
    },
    {
      "name": "Inline CSS",
      "description": "Enables css minification (e.g., minifyCSS true or custom css minifier hook) so style attributes and <style> blocks are compressed without semantic changes.",
      "max_score": 25
    },
    {
      "name": "Inline JS",
      "description": "Enables JavaScript minification (minifyJS) for event-handler attributes and applicable <script> tags, using processScripts or equivalent to cover browser JS types.",
      "max_score": 25
    },
    {
      "name": "Template ignores",
      "description": "Configures ignoreCustomFragments (or similar option) so templating markers like {{...}} or <% %> remain intact while surrounding code is minified.",
      "max_score": 15
    },
    {
      "name": "Skip non-JS",
      "description": "Limits processing via processScripts or related filters so non-JS MIME types (e.g., application/ld+json) are left untouched while JS is still minified.",
      "max_score": 15
    }
  ]
}

Install with Tessl CLI

npx tessl i tessl/npm-html-minifier

tile.json