UNPKG

@maverick-js/compiler

Version:

Maverick toolchain including the analyzer and compiler.

17 lines (16 loc) 717 B
import { type ComponentMeta } from '../meta/component'; import type { AnalyzePluginBuilder } from './AnalyzePlugin'; export type JSONPluginOutput = Record<string, any> & { components: ComponentMeta[]; }; export interface JSONPluginConfig extends Record<string, unknown> { cwd: string; outFile: string; transformJson?: (output: JSONPluginOutput) => Record<string, any>; stringifyJson?: (output: JSONPluginOutput, defaultReplacer: (key: string, value: any) => any, space: number) => string; } /** * Transforms component metadata into JSON format. This will run in the `transform` plugin * lifecycle step. */ export declare const createJSONPlugin: AnalyzePluginBuilder<Partial<JSONPluginConfig>>;