CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/npm-uglify-save-license

License detector for UglifyJS that identifies and preserves license comments during minification

Overall
score

98%

Overview
Eval results
Files

rubric.jsonevals/scenario-4/

{
  "context": "This criteria evaluates how well the engineer leverages the uglify-save-license package to implement automatic license comment detection. The focus is on correctly using the package's zero-configuration detection capability, which includes pattern-based license recognition, first-line comment preservation, and bang comment handling.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Package import",
      "description": "Correctly imports or requires the uglify-save-license package (e.g., `const saveLicense = require('uglify-save-license')`)",
      "max_score": 15
    },
    {
      "name": "Function usage",
      "description": "Uses the package's exported function (saveLicense) as the core implementation for comment detection",
      "max_score": 25
    },
    {
      "name": "License pattern detection",
      "description": "Leverages the package's built-in regex patterns to detect license-related keywords (MIT, GPL, BSD, Copyright, @preserve, etc.) without reimplementing pattern matching",
      "max_score": 25
    },
    {
      "name": "First-line detection",
      "description": "Utilizes the package's automatic first-line comment preservation feature (comments on line 1 are preserved regardless of content)",
      "max_score": 20
    },
    {
      "name": "Parameter handling",
      "description": "Correctly passes node and comment parameters to the saveLicense function with proper structure (file, type, value, line)",
      "max_score": 15
    }
  ]
}

Install with Tessl CLI

npx tessl i tessl/npm-uglify-save-license

tile.json