| 89 | const fs = yield* FileSystem.FileSystem |
| 90 | |
| 91 | const createVisualizationOutputs = (options: BundleOptions): ReadonlyArray<VisualizationOutput> => { |
| 92 | if (!options.visualize || !options.outputDirectory) { |
| 93 | return [] |
| 94 | } |
| 95 | const name = pathService.parse(options.path).name |
| 96 | return [ |
| 97 | { |
| 98 | filename: pathService.join(options.outputDirectory, `${name}.treemap.html`), |
| 99 | template: "treemap", |
| 100 | title: `${name} bundle treemap` |
| 101 | }, |
| 102 | { |
| 103 | filename: pathService.join(options.outputDirectory, `${name}.raw-data.json`), |
| 104 | template: "raw-data", |
| 105 | title: `${name} bundle raw data` |
| 106 | } |
| 107 | ] |
| 108 | } |
| 109 | |
| 110 | const getRollupOptions = (options: BundleOptions): RollupOptions => ({ |
| 111 | input: options.path, |