Skip to content
Nx Cloud CI is in private beta 10.6× faster average CI time with 79% less compute. Join the beta

▸ offsetFromRoot(fullPathToDir): string

Calculates an offset from the root of the workspace, which is useful for constructing relative URLs.

Examples:

offsetFromRoot("apps/mydir/myapp/") // returns "../../../"
NameTypeDescription
fullPathToDirstringdirectory path

string