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

{
  "context": "This evaluation assesses how effectively the engineer uses the postcss-modules-extract-imports package to transform CSS Module composes declarations into import rules. The focus is on proper integration and usage of the package's core external file import handling capability.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Plugin Integration",
      "description": "The solution correctly imports and uses postcss-modules-extract-imports as a PostCSS plugin. The plugin should be properly integrated into the PostCSS plugin structure with correct initialization.",
      "max_score": 25
    },
    {
      "name": "External Import Parsing",
      "description": "The solution leverages postcss-modules-extract-imports to parse composes declarations with 'from' syntax (e.g., 'composes: className from \"./file.css\"'). The plugin should correctly extract the import path and class names from the composes declaration.",
      "max_score": 25
    },
    {
      "name": "Import Rule Generation",
      "description": "The solution uses postcss-modules-extract-imports to generate :import() rules with unique identifiers. The generated identifiers should follow the pattern used by the package (e.g., i__imported_classname_N) and correctly map imported class names.",
      "max_score": 25
    },
    {
      "name": "Import Deduplication",
      "description": "The solution properly utilizes postcss-modules-extract-imports's built-in deduplication mechanism to reuse the same generated identifier when the same class is imported multiple times from the same file.",
      "max_score": 15
    },
    {
      "name": "Multiple Class Handling",
      "description": "The solution correctly uses postcss-modules-extract-imports to handle compositions that import multiple classes from a single file, generating separate unique identifiers for each class.",
      "max_score": 10
    }
  ]
}

Install with Tessl CLI

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

tile.json