MCPcopy Create free account
hub / github.com/pbakaus/impeccable / findTargetExample

Function findTargetExample

skill/scripts/context.mjs:420–437  ·  view source on GitHub ↗
(repoRoot, projectRoot)

Source from the content-addressed store, hash-verified

418}
419
420function findTargetExample(repoRoot, projectRoot) {
421 const examples = [
422 'src/App.jsx',
423 'src/App.tsx',
424 'src/main.jsx',
425 'src/main.tsx',
426 'src/index.jsx',
427 'src/index.ts',
428 'app/page.tsx',
429 'pages/index.tsx',
430 'public/index.html',
431 ];
432 for (const rel of examples) {
433 const abs = path.join(projectRoot, rel);
434 if (fs.existsSync(abs)) return path.relative(repoRoot, abs).split(path.sep).join('/');
435 }
436 return path.relative(repoRoot, projectRoot).split(path.sep).join('/');
437}
438
439function resolveWorkspaceProjectRoot(repoRoot, targetDir) {
440 const rel = path.relative(repoRoot, targetDir);

Callers 1

discoverTargetCandidatesFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected