CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/npm-parcel--plugin

Plugin API for Parcel bundler - provides base classes for creating Parcel plugins including transformers, resolvers, bundlers, namers, runtimes, packagers, optimizers, compressors, reporters, and validators

67

1.06x
Overview
Eval results
Files

task.mdevals/scenario-8/

Watch Diagnostics Helper

A small CLI helper that runs the bundler in watch mode and exposes interactive CPU profiling and heap snapshot controls for rebuilds.

Capabilities

Runs watch with diagnostics enabled

  • Starting the helper for src/index.html launches the bundler in watch mode with interactive diagnostics turned on, keeps stdin open, and prints instructions for the built-in shortcuts that trigger profiling and heap snapshots. @test

Captures CPU profile on demand

  • When the user requests a CPU profile using the documented shortcut, the helper triggers the bundler's profiling toggle and a timestamped profile file appears in the bundler's debug diagnostics directory. @test

Captures heap snapshot on demand

  • When the user requests a heap snapshot during watch, the helper invokes the bundler's snapshot shortcut and the resulting heap dump is written to the debug diagnostics directory. @test

Notifies users of outputs

  • After each profile or snapshot is written, the helper logs the absolute path of the created diagnostics artifact. @test

Implementation

@generates

API

/**
 * Starts a watch-mode diagnostics runner for the bundler.
 *
 * @param {string} entryFile - Entry file to watch (default: "src/index.html").
 * @returns {Promise<void>}
 */
export async function runDiagnostics(entryFile = "src/index.html");

Dependencies { .dependencies }

parcel { .dependency }

Provides the watch-mode bundler with built-in CPU profiling toggles and heap snapshot capture keys.

Install with Tessl CLI

npx tessl i tessl/npm-parcel--plugin

tile.json