CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/npm-postcss-modules-extract-imports

A CSS Modules transform to extract local aliases for inline imports

87

1.17x
Overview
Eval results
Files

rubric.jsonevals/scenario-3/

{
  "context": "This criteria evaluates how effectively the engineer uses the postcss-modules-extract-imports package to process CSS Modules composes declarations. The focus is on correctly integrating the plugin with PostCSS and utilizing its core transformation capabilities.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "PostCSS integration",
      "description": "Uses postcss.parse() or postcss() to parse CSS content and integrates postcss-modules-extract-imports as a plugin in the PostCSS processing pipeline",
      "max_score": 25
    },
    {
      "name": "Plugin invocation",
      "description": "Correctly invokes the postcss-modules-extract-imports plugin (e.g., via require('postcss-modules-extract-imports') and includes it in the PostCSS plugins array)",
      "max_score": 20
    },
    {
      "name": "External file processing",
      "description": "The solution correctly processes composes declarations from external files, resulting in :import() rules with generated identifiers (e.g., i__imported_button_0) that replace the original class names in the composes declarations",
      "max_score": 25
    },
    {
      "name": "Global scope handling",
      "description": "The solution correctly processes composes from global scope, wrapping global class names with global() wrapper as expected by the plugin's output",
      "max_score": 15
    },
    {
      "name": "Result extraction",
      "description": "Properly extracts and returns the transformed CSS output from the PostCSS result object (e.g., using result.css or result.toString())",
      "max_score": 15
    }
  ]
}

Install with Tessl CLI

npx tessl i tessl/npm-postcss-modules-extract-imports

tile.json