• Given a base path and a file path this method will return a relative path if the file path includes the base path otherwise the full absolute file path is returned.

    Parameters

    • Optional options: {
          basepath?: string;
          filepath: string;
      }

      Options

      • Optional basepath?: string

        The base path to create a relative path from filepath; default is CWD.

      • filepath: string

        The path to solve from basepath.

    Returns string

    A relative path based on basePath and filePath. (Unix)