MCPcopy Create free account
hub / github.com/Effect-TS/effect / createVisualizationReport

Method createVisualizationReport

packages/tools/bundle/src/Reporter.ts:177–191  ·  view source on GitHub ↗
(paths: ReadonlyArray<string>, outputDirectory: string)

Source from the content-addressed store, hash-verified

175 }
176
177 const createVisualizationReport = (paths: ReadonlyArray<string>, outputDirectory: string): string => {
178 const lines: Array<string> = [
179 "| File Name | Generated Bundle | Treemap | Raw Data |",
180 "|:----------|:----------------|:--------|:---------|"
181 ]
182 for (const entryPath of paths) {
183 const name = path.parse(entryPath).name
184 const filename = path.relative(currentDirectory, path.resolve(entryPath))
185 const minified = path.join(outputDirectory, `${name}.min.js`)
186 const treemap = path.join(outputDirectory, `${name}.treemap.html`)
187 const rawData = path.join(outputDirectory, `${name}.raw-data.json`)
188 lines.push(`| \`${filename}\` | \`${minified}\` | \`${treemap}\` | \`${rawData}\` |`)
189 }
190 return lines.join("\n") + "\n"
191 }
192
193 const report = Effect.fn("Reporter.report")(
194 function*(options: ReportOptions) {

Callers

nothing calls this directly

Calls 3

joinMethod · 0.80
pushMethod · 0.80
parseMethod · 0.45

Tested by

no test coverage detected