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

Function isNextProject

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

Source from the content-addressed store, hash-verified

13// next dependency in package.json.
14// ---------------------------------------------
15export function isNextProject(cwd: string = process.cwd()): boolean {
16 if (existsSync(path.join(cwd, 'next.config.js'))) return true;
17 try {
18 const pkg = JSON.parse(
19 readFileSync(path.join(cwd, 'package.json'), 'utf8')
20 );
21 return (
22 pkg.dependencies?.next !== undefined ||
23 pkg.devDependencies?.next !== undefined
24 );
25 } catch {
26 return false;
27 }
28}
29
30// ---------------------------------------------
31// Detect if the current directory is a React

Callers 1

plantSeedCommandFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected