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

Function printStreamsToConsole

playground/cli-module/__tests__/serve.ts:35–43  ·  view source on GitHub ↗
(name)

Source from the content-addressed store, hash-verified

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

Callers 2

serveFunction · 0.70
closeFunction · 0.70

Calls 1

logMethod · 0.80

Tested by

no test coverage detected