From ffc798ef4c9ec436a625f67e206ef86aee244e80 Mon Sep 17 00:00:00 2001 From: zhong666 Date: Tue, 18 Apr 2023 18:57:34 +0800 Subject: [PATCH] docs: README resolveWorkspacePkgsGraph --- README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/README.md b/README.md index d4e64e4..3956833 100644 --- a/README.md +++ b/README.md @@ -134,6 +134,15 @@ console.log(root) // { dir: 'fully/resolved/root/path', pakcageJson: { ... } } console.log(packages) // [ { dir: 'fully/resolved/foo/path', pakcageJson: { ... } } ] ``` +### `resolveWorkspacePkgsGraph` + +Find monorepo workspace packages graph sort by `devDependency` and `dependency` + +```js +import { resolveWorkspacePkgsGraph } from 'pkg-types' +const pkgsGraph = await resolveWorkspacePkgsGraph('.') +console.log(pkgsGraph) // [['foo'], ['bar']] +``` ## Types