CtrlK
CommunityDocumentationLog inGet started
Tessl Logo

tessl/npm-tailwindcss--node

Node.js-specific utilities and runtime functionality for Tailwind CSS v4, providing compilation tools, module dependency analysis, source map handling, path normalization, and optimization utilities.

43%

Overall

Evaluation43%

1.16x

Agent success when using this tile

Overview
Eval results
Files

task.mdevals/scenario-10/

Source Map Formatter

Utility for serializing source map inputs into raw JSON and inline comment forms, then appending inline comments to CSS output.

Capabilities

Serialize string maps

  • Given {"version":3,"sources":["input.css"],"names":[],"mappings":"AAAA"} as a JSON string input, returns raw equal to the input and inlineComment equal to /*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImlucHV0LmNzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSJ9 */. @test

Normalize decoded maps

  • Given a decoded map with two mappings pointing to the same file (components/button.css with content .btn { padding: 0.5rem; }), the serialized raw map JSON contains version: 3, sources: ["components/button.css"], sourcesContent: [".btn { padding: 0.5rem; }"], and a non-empty mappings string, and inlineComment encodes that raw map. @test

Handle missing sources

  • Given a decoded map where one mapping omits originalPosition and another maps to a null source, the serialized raw map JSON includes placeholder source names starting with <unknown and empty sourcesContent entries, while still producing an inlineComment prefixed with /*# sourceMappingURL=data:application/json;base64,. @test

Attach inline comment to CSS

  • Appending an inline source map comment to .btn { display: flex; } using the string map input produces output ending with exactly one newline plus the inline comment, leaving the original CSS unchanged otherwise. @test

Implementation

@generates

API

export type MapInput = string | DecodedMap;

export interface DecodedMap {
  mappings: Array<{
    generatedPosition: { line: number; column: number };
    originalPosition?: {
      line: number;
      column: number;
      source: SourceFile | null;
    };
    name?: string;
  }>;
}

export interface SourceFile {
  url: string;
  content: string;
}

export interface SerializedMap {
  raw: string;
  inlineComment: string;
}

/**
 * Serializes provided map input into raw JSON and inline comment form.
 */
export function serializeMap(input: MapInput): SerializedMap;

/**
 * Returns the provided CSS with an inline source map comment appended.
 */
export function attachInlineMap(css: string, map: MapInput): string;

Dependencies { .dependencies }

@tailwindcss/node { .dependency }

Provides source map serialization utilities.

@satisfied-by

tessl i tessl/npm-tailwindcss--node@4.1.0

tile.json