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

{
  "context": "Evaluates how the solution applies html-minifier to prune optional tags and normalize doctypes for lightweight HTML output. Scoring focuses exclusively on configuring the library's options to match the spec scenarios (full documents and fragments). Each check rewards correct and sufficient use of the html-minifier API rather than general code quality.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Short doctype",
      "description": "Configures html-minifier with `useShortDoctype: true` (or equivalent) so long doctypes are collapsed to `<!doctype html>` in the output.",
      "max_score": 25
    },
    {
      "name": "Optional tag pruning",
      "description": "Enables `removeOptionalTags` to strip default wrappers like <html>, <head>, and <body> when safe, keeping head resources before body content in the minified string.",
      "max_score": 30
    },
    {
      "name": "Empty element removal",
      "description": "Uses `removeEmptyElements` (or a documented equivalent) to delete empty non-void containers with no attributes or children while ensuring keep-list elements such as script, style, meta, link, img, br, and hr remain.",
      "max_score": 25
    },
    {
      "name": "Fragment safety",
      "description": "Prevents auto-inserted wrappers on HTML fragments by setting `includeAutoGeneratedTags: false` (or equivalent) so snippets remain unwrapped while still benefiting from optional-tag removal inside the fragment.",
      "max_score": 20
    }
  ]
}

Install with Tessl CLI

npx tessl i tessl/npm-html-minifier

tile.json