function isRepoRoot()

in contribs/just-repo-utils/src/repoInfo.ts [17:22]


function isRepoRoot(cwd: string, config?: PackageJson): boolean | undefined {
  const just = config && config.just;
  const isRootFromJust = just && (just.root || (just.stack && just.stack === 'just-stack-monorepo'));
  const isRootFromMonorepoConfigs = config && (fse.existsSync(path.join(cwd, 'rush.json')) || fse.existsSync(path.join(cwd, 'lerna.json')));
  return isRootFromJust || isRootFromMonorepoConfigs;
}