MCPcopy
hub / github.com/vitejs/vite / printStreamsToConsole

Function printStreamsToConsole

playground/cli/__tests__/serve.ts:38–46  ·  view source on GitHub ↗
(name)

Source from the content-addressed store, hash-verified

36
37 // helper to output stream content on error
38 const printStreamsToConsole = async (name) => {
39 const std = streams[name]
40 if (std.out && std.out.length > 0) {
41 console.log(`stdout of ${name}\n${std.out.join('\n')}\n`)
42 }
43 if (std.err && std.err.length > 0) {
44 console.log(`stderr of ${name}\n${std.err.join('\n')}\n`)
45 }
46 }
47
48 // only run `vite build` when needed
49 if (isBuild) {

Callers 2

serveFunction · 0.70
closeFunction · 0.70

Calls 1

logMethod · 0.80

Tested by

no test coverage detected