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

{
  "context": "This criteria evaluates the engineer's proficiency in using the uglify-save-license package for preserving license comments during JavaScript minification. The focus is on correct API usage, proper integration with UglifyJS, and understanding of the saveLicense function's role as a comment filter.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Import saveLicense",
      "description": "Correctly imports or requires the uglify-save-license package using require('uglify-save-license') or appropriate ES module import",
      "max_score": 15
    },
    {
      "name": "Import UglifyJS",
      "description": "Correctly imports or requires uglify-js package for minification functionality",
      "max_score": 10
    },
    {
      "name": "Use saveLicense function",
      "description": "Passes the saveLicense function as a callback to UglifyJS configuration, specifically using it in the comments option (e.g., output.comments, preserveComments, or similar)",
      "max_score": 40
    },
    {
      "name": "Configure UglifyJS correctly",
      "description": "Properly configures UglifyJS.minify() or equivalent method with appropriate options object that includes the saveLicense function in the correct location",
      "max_score": 20
    },
    {
      "name": "Read input file",
      "description": "Implements file reading functionality to load the JavaScript file specified as a command-line argument",
      "max_score": 5
    },
    {
      "name": "Output minified code",
      "description": "Outputs the minified result to stdout, extracting the code property or equivalent from the minification result",
      "max_score": 10
    }
  ]
}

Install with Tessl CLI

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

tile.json