CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/npm-snowpack

A lightning-fast frontend build tool designed to leverage JavaScript's native ESM system for unbundled development with instant browser updates.

82

1.22x
Overview
Eval results
Files

rubric.jsonevals/scenario-7/

{
  "context": "This criteria evaluates how well the engineer uses Snowpack's plugin system to create an image optimization plugin. It focuses on correct implementation of plugin lifecycle hooks, proper plugin structure, and effective use of Snowpack's plugin API features.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Plugin Structure",
      "description": "The plugin returns an object with a 'name' property (string) and plugin hooks. The function signature matches Snowpack plugin conventions.",
      "max_score": 15
    },
    {
      "name": "Load Hook",
      "description": "Implements the 'load' hook that intercepts .png, .jpg, and .jpeg files. The hook specifies correct 'input' extensions and 'output' extensions (including .js for the metadata module).",
      "max_score": 25
    },
    {
      "name": "Transform Hook",
      "description": "Implements the 'transform' hook to process image files. The hook receives file contents and returns transformed output with proper structure (code/contents and map properties).",
      "max_score": 20
    },
    {
      "name": "Multiple File Outputs",
      "description": "Returns multiple output files from a single input using the correct build map structure. Generates all required variants (original WebP, thumbnail, medium) plus the JavaScript metadata module.",
      "max_score": 20
    },
    {
      "name": "Configuration Integration",
      "description": "Properly accepts and uses plugin configuration options (sizes, quality, skipOptimization). Applies default values when options are not provided.",
      "max_score": 10
    },
    {
      "name": "Context Awareness",
      "description": "Uses plugin context flags (isDev, isSSR, etc.) or checks build mode to conditionally apply optimizations based on the skipOptimization setting.",
      "max_score": 10
    }
  ]
}

Install with Tessl CLI

npx tessl i tessl/npm-snowpack

tile.json