Skip to content

Signatures

offsetFromRoot(fullPathToDir: string): string

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

Examples:

offsetFromRoot("apps/mydir/myapp/") // returns "../../../"

Parameters

  • fullPathToDir: string - directory path