CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/npm-rollup-plugin-sizes

Show info about files/packages included with your rollup bundle

94

1.09x
Overview
Eval results
Files

rubric.jsonevals/scenario-5/

{
  "context": "This evaluation assesses how well the engineer leverages Rollup's plugin system and module metadata to measure original source sizes. The focus is on correctly accessing module.originalLength for pre-minification size analysis, properly implementing the generateBundle hook, and accurately processing bundle metadata.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Plugin structure",
      "description": "Returns a valid Rollup plugin object with a 'name' property and implements the 'generateBundle' hook function",
      "max_score": 15
    },
    {
      "name": "generateBundle hook",
      "description": "Correctly implements the generateBundle hook with proper signature (options, bundle, isWrite) or (outputOptions, bundle) to access bundle metadata during the generation phase",
      "max_score": 20
    },
    {
      "name": "Module iteration",
      "description": "Iterates through the bundle object (bundle.modules or this.getModuleInfo) to access individual module metadata",
      "max_score": 15
    },
    {
      "name": "originalLength usage",
      "description": "Uses module.originalLength (or module metadata's originalLength property) to retrieve the original, pre-minification size of each module",
      "max_score": 30
    },
    {
      "name": "Size aggregation",
      "description": "Correctly aggregates module sizes to calculate the totalSize by summing all module.originalLength values",
      "max_score": 10
    },
    {
      "name": "Output generation",
      "description": "Uses this.emitFile with type: 'asset' or equivalent mechanism to write the size-report.json file to the output directory",
      "max_score": 10
    }
  ]
}

Install with Tessl CLI

npx tessl i tessl/npm-rollup-plugin-sizes

tile.json