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

{
  "context": "This criteria evaluates how well the engineer integrates uglify-save-license with UglifyJS to create a minification utility that preserves license comments. It focuses on proper usage of both packages and their integration points.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "UglifyJS import",
      "description": "Correctly imports or requires the uglify-js package (e.g., `const UglifyJS = require('uglify-js')` or `import * as UglifyJS from 'uglify-js'`)",
      "max_score": 10
    },
    {
      "name": "uglify-save-license import",
      "description": "Correctly imports or requires the uglify-save-license package (e.g., `const saveLicense = require('uglify-save-license')` or `import saveLicense from 'uglify-save-license'`)",
      "max_score": 10
    },
    {
      "name": "UglifyJS.minify usage",
      "description": "Calls UglifyJS.minify() function to perform the minification operation on the source code",
      "max_score": 20
    },
    {
      "name": "Comments option configuration",
      "description": "Passes an options object to UglifyJS.minify() that includes output configuration with a comments property (e.g., `output: { comments: ... }`)",
      "max_score": 25
    },
    {
      "name": "saveLicense integration",
      "description": "Passes the saveLicense function (or the result of calling it) as the value for the comments option to enable license preservation (e.g., `comments: saveLicense` or `comments: saveLicense()`)",
      "max_score": 25
    },
    {
      "name": "Return minified code",
      "description": "Returns the minified code string from the result of UglifyJS.minify() (typically accessed via result.code)",
      "max_score": 10
    }
  ]
}

Install with Tessl CLI

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

tile.json