summaryrefslogtreecommitdiff
path: root/cli/js/compiler_imports.ts
diff options
context:
space:
mode:
authorBartek Iwańczuk <biwanczuk@gmail.com>2020-03-05 13:05:41 +0100
committerBartek Iwańczuk <biwanczuk@gmail.com>2020-03-05 18:48:55 +0100
commit2e590072148c85bbc479ab49aa9556b0a2cfaff2 (patch)
tree89747e7b6762158e35f9120ca0ef0fa14991ae34 /cli/js/compiler_imports.ts
parent9b59ed7c7907c5f365e72b5c5a74114eb8ff1488 (diff)
move Web APIs to cli/js/web/
Diffstat (limited to 'cli/js/compiler_imports.ts')
-rw-r--r--cli/js/compiler_imports.ts7
1 files changed, 4 insertions, 3 deletions
diff --git a/cli/js/compiler_imports.ts b/cli/js/compiler_imports.ts
index 903bcfe4d..387c47fc4 100644
--- a/cli/js/compiler_imports.ts
+++ b/cli/js/compiler_imports.ts
@@ -5,6 +5,7 @@ import {
SourceFile,
SourceFileJson
} from "./compiler_sourcefile.ts";
+import { normalizeString, CHAR_FORWARD_SLASH } from "./compiler_util.ts";
import { cwd } from "./dir.ts";
import { sendAsync, sendSync } from "./dispatch_json.ts";
import { assert } from "./util.ts";
@@ -27,18 +28,18 @@ function resolvePath(...pathSegments: string[]): string {
}
resolvedPath = `${path}/${resolvedPath}`;
- resolvedAbsolute = path.charCodeAt(0) === util.CHAR_FORWARD_SLASH;
+ resolvedAbsolute = path.charCodeAt(0) === CHAR_FORWARD_SLASH;
}
// At this point the path should be resolved to a full absolute path, but
// handle relative paths to be safe (might happen when cwd() fails)
// Normalize the path
- resolvedPath = util.normalizeString(
+ resolvedPath = normalizeString(
resolvedPath,
!resolvedAbsolute,
"/",
- code => code === util.CHAR_FORWARD_SLASH
+ code => code === CHAR_FORWARD_SLASH
);
if (resolvedAbsolute) {