[][src]Function sourcemap::make_relative_path

pub fn make_relative_path(base: &str, target: &str) -> String

Helper function to calculate the path from a base file to a target file.

This is intended to caculate the path from a minified JavaScript file to a sourcemap if they are both on the same server.

Example:

assert_eq!(&make_relative_path(
    "/foo/bar/baz.js", "/foo/baz.map"), "../baz.map");