UNPKG

@stacksjs/stx

Version:

A performant UI Framework. Powered by Bun.

60 lines 1.49 kB
import { collectBundleStats, formatBytes, parseSize } from './collector'; import { generateReport, analyzeBundle } from './report'; import { generateTreemap, openInBrowser } from './treemap'; /** * Analyze a bundle directory and generate a report */ export declare function analyze(options?: AnalyzeOptions): Promise<{ stats: ReturnType<typeof collectBundleStats> extends Promise<infer T> ? T : never report: string outputPath?: string exceedsThreshold: boolean }>; /** * Quick summary of bundle size */ export declare function getBundleSummary(directory: string): Promise<{ totalSize: number totalSizeFormatted: string gzipSize: number gzipSizeFormatted: string moduleCount: number chunkCount: number }>; export declare interface AnalyzeOptions { directory?: string output?: string format?: 'html' | 'json' | 'text' | 'markdown' open?: boolean gzip?: boolean threshold?: string | number recommendations?: boolean topModules?: number parseImports?: boolean } export { collectBundleStats, formatBytes, parseSize, percentage, type ModuleInfo, type ModuleType, type ChunkInfo, type DuplicateModule, type BundleStats, type CollectorOptions, } from './collector'; export { generateReport, analyzeBundle, getModuleRecommendation, type ReportOptions, type AnalysisResult, type AnalysisIssue, type Recommendation, } from './report'; export { generateTreemap, openInBrowser, type TreemapOptions, } from './treemap';