or run

npx @tessl/cli init
Log in

Version

Files

tile.json

task.mdevals/scenario-3/

Feature Flag Parcel Runner

A minimal utility that runs the Parcel CLI with optional experimental feature flag overrides for builds or dev server runs.

Capabilities

Runs builds with feature flags

  • Running a build with two feature flag overrides writes bundled assets to the requested output directory and each override is forwarded to the bundler as its own feature flag argument. @test

Validates overrides before running

  • Providing a feature flag with a missing name or value rejects with an error before any bundler process starts. @test

Dry-run preview

  • When dry-run mode is enabled, it returns the exact bundler command string (including feature flag arguments) without invoking the bundler. @test

Default run without overrides

  • With no feature flags provided, it still runs the bundler successfully and reports the default output directory. @test

Implementation

@generates

API

export type RunMode = 'build' | 'serve';

export interface FeatureFlagOptions {
  entries: string[];
  flags: Record<string, string>;
  outDir?: string;
  mode?: RunMode;
  dryRun?: boolean;
}

export interface RunResult {
  command: string;
  exitCode: number | null;
  exited: boolean;
  outputDir: string;
}

export async function runWithFeatureFlags(options: FeatureFlagOptions): Promise<RunResult>;

Dependencies { .dependencies }

parcel { .dependency }

Bundles assets and accepts experimental feature flag override arguments to toggle internal behavior.