@harmoniclabs/pebble 0.1.0-dev4 → 0.1.0-dev5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -51,10 +51,15 @@ function addExtension(path, endsWithSlash) {
|
|
|
51
51
|
// Otherwise just add the extension
|
|
52
52
|
return path + extension;
|
|
53
53
|
}
|
|
54
|
+
export function isAbsolutePath(path) {
|
|
55
|
+
return path.startsWith(PATH_DELIMITER);
|
|
56
|
+
}
|
|
54
57
|
export function getEnvRelativePath(filePath, projectRoot) {
|
|
55
58
|
if (!(typeof filePath === 'string' &&
|
|
56
59
|
typeof projectRoot === 'string'))
|
|
57
60
|
return undefined;
|
|
61
|
+
if (isAbsolutePath(filePath))
|
|
62
|
+
return filePath;
|
|
58
63
|
projectRoot = projectRoot.trim();
|
|
59
64
|
filePath = getAbsolutePath(filePath.trim(), projectRoot);
|
|
60
65
|
if (!filePath)
|
package/package.json
CHANGED