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

{
  "context": "This criteria evaluates how effectively the engineer uses the uglify-save-license package to implement license comment detection. The focus is on proper integration of the saveLicense function and its callback signature to identify comments based on pattern matching, special formats, and positional criteria.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Imports saveLicense function",
      "description": "Uses require('uglify-save-license') or equivalent import to access the saveLicense function",
      "max_score": 15
    },
    {
      "name": "Parses JavaScript with UglifyJS",
      "description": "Uses UglifyJS or compatible parser to tokenize JavaScript file and extract comment tokens with proper structure (file, type, value, line properties)",
      "max_score": 20
    },
    {
      "name": "Calls saveLicense correctly",
      "description": "Invokes saveLicense function with correct signature saveLicense(node, comment) where comment contains required properties (file, type, value, line)",
      "max_score": 25
    },
    {
      "name": "Handles comment types",
      "description": "Properly maps UglifyJS comment types ('comment1' for line comments, 'comment2' for block comments) when passing to saveLicense function",
      "max_score": 15
    },
    {
      "name": "Filters based on return",
      "description": "Correctly uses the boolean return value from saveLicense to filter which comments are preserved in the output array",
      "max_score": 15
    },
    {
      "name": "Produces correct output",
      "description": "Outputs an array of objects with line, type, and value properties for each comment identified by saveLicense as a license comment",
      "max_score": 10
    }
  ]
}

Install with Tessl CLI

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

tile.json