MCPcopy Index your code
hub / github.com/developit/optimize-plugin / run

Function run

test/_util.js:117–138  ·  view source on GitHub ↗
(runner, console)

Source from the content-addressed store, hash-verified

115}
116
117function run (runner, console) {
118 return new Promise((resolve, reject) => {
119 runner(async (err, stats) => {
120 if (err) return reject(err);
121
122 await statsWithAssets(stats);
123
124 stats.info = stats.toJson({ assets: true, chunks: true });
125
126 if (stats.hasWarnings()) {
127 stats.info.warnings.forEach(warning => {
128 console.warn('Webpack warning: ', warning);
129 });
130 console.warn('\nWebpack build generated ' + stats.info.warnings.length + ' warnings(s), shown above.\n\n');
131 }
132 if (stats.hasErrors()) {
133 return reject(stats.info.errors.join('\n'));
134 }
135 resolve(stats);
136 });
137 });
138}

Callers 2

runWebpackFunction · 0.85
watchWebpackFunction · 0.85

Calls 1

statsWithAssetsFunction · 0.85

Tested by

no test coverage detected