Skip to content

script-utils/root

Contains utility functions for executing commands from the root folder of a project, resolving paths relative to the root.

InterfaceDescription
ResolvePathFromRootParamsParameters for resolvePathFromRoot.
ResolvePathFromRootSafeParamsParameters for resolvePathFromRootSafe.
ToRelativeFromRootParamsParameters for toRelativeFromRoot.
FunctionDescription
execFromRootExecutes a command from the root folder of the project.
getRootFolderRetrieves the root folder of the project.
resolvePathFromRootResolves a path relative to the root folder of the project.
resolvePathFromRootSafeResolves a path relative to the root folder, returning the resolved path or the original path if it does not exist.
toRelativeFromRootConverts an absolute path to a relative path from the root folder of the project.
TypeDescription
ExecFromRootOptionsOptions for execFromRoot.