MCPcopy Create free account
hub / github.com/CedarCopilot/cedar-OS / isReactProject

Function isReactProject

packages/cli/src/cli-helpers.ts:35–50  ·  view source on GitHub ↗
(cwd: string = process.cwd())

Source from the content-addressed store, hash-verified

33// dependency in package.json.
34// ---------------------------------------------
35export function isReactProject(cwd: string = process.cwd()): boolean {
36 try {
37 const pkg = JSON.parse(
38 readFileSync(path.join(cwd, 'package.json'), 'utf8')
39 );
40 return (
41 (pkg.dependencies?.react !== undefined ||
42 pkg.devDependencies?.react !== undefined) &&
43 // Exclude Next.js projects (already handled separately)
44 pkg.dependencies?.next === undefined &&
45 pkg.devDependencies?.next === undefined
46 );
47 } catch {
48 return false;
49 }
50}
51
52// ---------------------------------------------
53// Run the Cedar component installer (init).

Callers 1

plantSeedCommandFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected