Function sourcemap::make_relative_path
source · Expand description
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");