MCPcopy
hub / github.com/FormidableLabs/webpack-dashboard / setStats

Method setStats

dashboard/index.js:153–174  ·  view source on GitHub ↗
(data)

Source from the content-addressed store, hash-verified

151 }
152
153 setStats(data) {
154 const stats = {
155 hasErrors: () => data.value.errors,
156 hasWarnings: () => data.value.warnings,
157 toJson: () => data.value.data
158 };
159
160 // Save for later when merging inspectpack sizes into the asset list
161 this.stats = stats;
162
163 if (stats.hasErrors()) {
164 this.status.setContent("{red-fg}{bold}Failed{/}");
165 }
166
167 this.logText.log(formatOutput(stats));
168
169 if (!this.minimal) {
170 this.modulesMenu.setLabel(chalk.yellow("Modules (loading...)"));
171 this.assets.setLabel(chalk.yellow("Assets (loading...)"));
172 this.problemsMenu.setLabel(chalk.yellow("Problems (loading...)"));
173 }
174 }
175
176 setSizes(data) {
177 const { assets } = data.value;

Callers 1

index.spec.jsFile · 0.80

Calls 1

formatOutputFunction · 0.85

Tested by

no test coverage detected