MCPcopy
hub / github.com/remix-run/react-router / grep

Function grep

integration/helpers/vite.ts:597–608  ·  view source on GitHub ↗
(cwd: string, pattern: RegExp)

Source from the content-addressed store, hash-verified

595}
596
597export function grep(cwd: string, pattern: RegExp): string[] {
598 let assetFiles = globSync("**/*.@(js|jsx|ts|tsx)", { cwd }).map((file) =>
599 path.resolve(cwd, file),
600 );
601
602 let lines = shell
603 .grep("-l", pattern, assetFiles)
604 .stdout.trim()
605 .split("\n")
606 .filter((line) => line.length > 0);
607 return lines;
608}

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…