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

{
  "context": "This criteria evaluates how well the engineer uses the postcss-modules-extract-imports package to implement a custom import naming strategy. The focus is on correctly configuring and utilizing the createImportedName option to generate custom identifiers for imported CSS class names.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Uses extract-imports plugin",
      "description": "Imports and uses the postcss-modules-extract-imports plugin in the solution",
      "max_score": 15
    },
    {
      "name": "Configures createImportedName",
      "description": "Provides a createImportedName function as an option when initializing the postcss-modules-extract-imports plugin",
      "max_score": 25
    },
    {
      "name": "Custom name generation",
      "description": "The createImportedName function generates custom names that include the required components: prefix, original class name, and sanitized path information",
      "max_score": 30
    },
    {
      "name": "Path parameter usage",
      "description": "Uses the path parameter (second argument) of createImportedName to extract and incorporate file path information into the generated name",
      "max_score": 15
    },
    {
      "name": "PostCSS integration",
      "description": "Uses postcss to parse the input CSS and process it with the configured plugin, returning the transformed result",
      "max_score": 15
    }
  ]
}

Install with Tessl CLI

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

tile.json