Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(devkit): expose findMatchingProjects from @nx/devkit #28984

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/generated/devkit/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ It only uses language primitives and immutable objects
- [detectPackageManager](../../devkit/documents/detectPackageManager)
- [ensurePackage](../../devkit/documents/ensurePackage)
- [extractLayoutDirectory](../../devkit/documents/extractLayoutDirectory)
- [findMatchingProjects](../../devkit/documents/findMatchingProjects)
- [formatFiles](../../devkit/documents/formatFiles)
- [generateFiles](../../devkit/documents/generateFiles)
- [getOutputsForTargetAndConfiguration](../../devkit/documents/getOutputsForTargetAndConfiguration)
Expand Down
16 changes: 16 additions & 0 deletions docs/generated/devkit/findMatchingProjects.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Function: findMatchingProjects

▸ **findMatchingProjects**(`patterns?`, `projects`): `string`[]

Find matching project names given a list of potential project names or globs.

#### Parameters

| Name | Type | Default value | Description |
| :--------- | :------------------------------------------------------------------------------------------------ | :------------ | :-------------------------------------------------------------------------------------------------- |
| `patterns` | `string`[] | `[]` | A list of project names or globs to match against. |
| `projects` | `Record`\<`string`, [`ProjectGraphProjectNode`](../../devkit/documents/ProjectGraphProjectNode)\> | `undefined` | A map of [ProjectGraphProjectNode](../../devkit/documents/ProjectGraphProjectNode) by project name. |

#### Returns

`string`[]
1 change: 1 addition & 0 deletions docs/generated/packages/devkit/documents/nx_devkit.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ It only uses language primitives and immutable objects
- [detectPackageManager](../../devkit/documents/detectPackageManager)
- [ensurePackage](../../devkit/documents/ensurePackage)
- [extractLayoutDirectory](../../devkit/documents/extractLayoutDirectory)
- [findMatchingProjects](../../devkit/documents/findMatchingProjects)
- [formatFiles](../../devkit/documents/formatFiles)
- [generateFiles](../../devkit/documents/generateFiles)
- [getOutputsForTargetAndConfiguration](../../devkit/documents/getOutputsForTargetAndConfiguration)
Expand Down
5 changes: 5 additions & 0 deletions packages/nx/src/devkit-exports.ts
Original file line number Diff line number Diff line change
Expand Up @@ -248,4 +248,9 @@ export { cacheDir } from './utils/cache-directory';
*/
export { createProjectFileMapUsingProjectGraph } from './project-graph/file-map-utils';

/**
* @category Utils
*/
export { findMatchingProjects } from './utils/find-matching-projects';

export { isDaemonEnabled } from './daemon/client/client';