nx/docs/generated/devkit/offsetFromRoot.md

23 lines
456 B
Markdown

# Function: offsetFromRoot
**offsetFromRoot**(`fullPathToDir`): `string`
Calculates an offset from the root of the workspace, which is useful for
constructing relative URLs.
Examples:
```typescript
offsetFromRoot('apps/mydir/myapp/'); // returns "../../../"
```
#### Parameters
| Name | Type | Description |
| :-------------- | :------- | :------------- |
| `fullPathToDir` | `string` | directory path |
#### Returns
`string`