Skip to content

Commit

Permalink
feat(devkit): expose findMatchingProjects from @nx/devkit
Browse files Browse the repository at this point in the history
  • Loading branch information
iAmNathanJ committed Nov 19, 2024
1 parent 429ea42 commit 7f521f1
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 0 deletions.
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';

0 comments on commit 7f521f1

Please sign in to comment.