escapeGlob
▸ escapeGlob(path): string
Escapes the glob syntax in a path so that, used as a task input, it
matches only that path. Nx reads every fileset input as a glob, so a real
path like app/(group)/page.tsx or tools/[setup].mts would otherwise
match other files, or none.
Escape only the path, and append any pattern after it:
`{workspaceRoot}/${escapeGlob(setupFile)}``{workspaceRoot}/${escapeGlob(configDir)}/*.json`Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
path | string | a workspace-relative path, using / separators |
Returns
Section titled “Returns”string