UNPKG

vils

Version:

Recursively outputs file paths and contents in various formats

14 lines (13 loc) 457 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.PlainFormatter = void 0; class PlainFormatter { format(entries) { return entries.map(e => { if (typeof e.content === 'string') return `// ${e.relativePath}\n${e.content}`; return `// ${e.relativePath}\n<vils unable to read: ${e.content.error}>`; }).join('\n\n'); } } exports.PlainFormatter = PlainFormatter;