License detector for UglifyJS that identifies and preserves license comments during minification
Overall
score
98%
{
"context": "This criteria evaluates how well the engineer uses the uglify-save-license package to implement consecutive license comment detection and preservation during JavaScript minification. The focus is on correctly using the package's stateful detection capabilities and integrating it with a minification tool.",
"type": "weighted_checklist",
"checklist": [
{
"name": "Import saveLicense",
"description": "Correctly imports or requires the uglify-save-license package (e.g., `const saveLicense = require('uglify-save-license')` or equivalent ES6 import)",
"max_score": 15
},
{
"name": "Integrate with minifier",
"description": "Correctly integrates the saveLicense function with a minification tool (such as UglifyJS) by passing it as the comments preservation callback (e.g., using it in the `output.comments` option for UglifyJS or `preserveComments` option)",
"max_score": 25
},
{
"name": "Preserve consecutive blocks",
"description": "The implementation correctly preserves consecutive license comment blocks by leveraging uglify-save-license's stateful behavior, where comments following an identified license comment are also preserved",
"max_score": 30
},
{
"name": "Handle mixed comments",
"description": "Correctly handles mixed comment types (line comments and block comments) in consecutive blocks by utilizing uglify-save-license's ability to detect both 'comment1' (line) and 'comment2' (block) types",
"max_score": 20
},
{
"name": "Minification execution",
"description": "Successfully executes the minification process with the integrated saveLicense function, producing minified output with preserved license comments",
"max_score": 10
}
]
}Install with Tessl CLI
npx tessl i tessl/npm-uglify-save-licensedocs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10