UNPKG

repomix

Version:

A tool to pack repository contents to single file for AI consumption

20 lines (19 loc) 695 B
import { BaseParseStrategy } from './BaseParseStrategy.js'; export class VueParseStrategy extends BaseParseStrategy { parseCapture(capture, lines, processedChunks, _context) { const { node, name } = capture; const startRow = node.startPosition.row; const endRow = node.endPosition.row; const selectedLines = this.extractLines(lines, startRow, endRow); if (!selectedLines) { return null; } const chunk = selectedLines.join('\n'); const chunkId = `${name}:${startRow}`; if (processedChunks.has(chunkId)) { return null; } processedChunks.add(chunkId); return chunk; } }