CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/npm-clean-css

A well-tested CSS minifier providing fast and efficient CSS optimization and minification.

93

1.17x

Quality

Pending

Does it follow best practices?

Impact

93%

1.17x

Average score across 10 eval scenarios

SecuritybySnyk

Pending

The risk profile of this skill

Overview
Eval results
Files

rubric.jsonevals/scenario-1/

{
  "context": "This criteria evaluates how effectively the engineer uses the clean-css package to fetch and minify remote CSS files while generating source maps. The focus is on proper use of remote resource fetching, source map generation, and error handling features provided by clean-css.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "CleanCSS instantiation",
      "description": "Creates a new CleanCSS instance with appropriate options. Should use the CleanCSS constructor (e.g., new CleanCSS(options)).",
      "max_score": 10
    },
    {
      "name": "Source map enabled",
      "description": "Enables source map generation by setting sourceMap: true in the CleanCSS options object.",
      "max_score": 15
    },
    {
      "name": "Remote inlining enabled",
      "description": "Configures the instance to handle remote resources by using inline: ['remote'] or inline: 'remote' option to enable remote @import and source map fetching.",
      "max_score": 20
    },
    {
      "name": "Minify method call",
      "description": "Calls the minify() method on the CleanCSS instance to process the CSS. Should pass the remote URL or fetched CSS content to minify().",
      "max_score": 15
    },
    {
      "name": "Async handling",
      "description": "Properly handles the asynchronous nature of remote resource fetching, either by using the callback parameter of minify() or by setting returnPromise: true and using Promise/async-await.",
      "max_score": 20
    },
    {
      "name": "Source map extraction",
      "description": "Extracts the source map from the minify result. Should access output.sourceMap or output.sourceMap.toString() to get the generated source map.",
      "max_score": 10
    },
    {
      "name": "Error handling",
      "description": "Checks and handles errors from the minify result by examining the output.errors array and reporting or throwing errors appropriately.",
      "max_score": 10
    }
  ]
}

tile.json