Revert "fix(ivy): correct ngtsc path handling in Windows (#26703)"

This reverts commit d0037b22ef. The commit must be temporarily reverted because
there were unforeseen breakages in g3.
This commit is contained in:
Kara Erickson
2018-11-05 11:18:52 -08:00
parent d0037b22ef
commit 4e4bca6bbc
10 changed files with 15 additions and 18 deletions

View File

@ -5,13 +5,13 @@ load("//tools:defaults.bzl", "ts_library")
ts_library(
name = "util",
srcs = glob([
"index.ts",
"src/**/*.ts",
]),
module_name = "@angular/compiler-cli/src/ngtsc/util",
deps = [
"//packages:types",
"@ngdeps//@types/node",
"@ngdeps//canonical-path",
"@ngdeps//typescript",
],
)

View File

@ -8,12 +8,12 @@
/// <reference types="node" />
import * as path from 'canonical-path';
import * as path from 'path';
const TS_DTS_EXTENSION = /(\.d)?\.ts$/;
export function relativePathBetween(from: string, to: string): string|null {
let relative = path.relative(path.dirname(from), to).replace(TS_DTS_EXTENSION, '');
let relative = path.posix.relative(path.dirname(from), to).replace(TS_DTS_EXTENSION, '');
if (relative === '') {
return null;
@ -25,4 +25,4 @@ export function relativePathBetween(from: string, to: string): string|null {
}
return relative;
}
}