MCPcopy
hub / github.com/FredKSchott/snowpack / projectURL

Function projectURL

plugins/plugin-optimize/util.js:28–30  ·  view source on GitHub ↗

URL relative

(url, buildDirectory)

Source from the content-addressed store, hash-verified

26
27/** URL relative */
28function projectURL(url, buildDirectory) {
29 return path.relative(buildDirectory, url).replace(/\\/g, '/').replace(/^\/?/, '/');
30}
31exports.projectURL = projectURL;
32
33/** Remove \ and / from beginning of string */

Callers 3

formatFunction · 0.85
scanJSFunction · 0.85
preloadJSFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected