cli-node: document and export isMonoRepo

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
Patrik Oldsberg
2023-04-06 15:02:53 +02:00
parent fc12d96b1d
commit 3e59391396
2 changed files with 6 additions and 0 deletions
+1
View File
@@ -14,6 +14,7 @@
* limitations under the License.
*/
export { isMonoRepo } from './isMonoRepo';
export {
PackageGraph,
type PackageGraphNode,
@@ -17,6 +17,11 @@
import { paths } from '../paths';
import fs from 'fs-extra';
/**
* Returns try if the current project is a monorepo.
*
* @public
*/
export async function isMonoRepo(): Promise<boolean> {
const rootPackageJsonPath = paths.resolveTargetRoot('package.json');
try {