Path normalization

This commit is contained in:
Michelle Tilley
2017-05-17 20:56:30 +02:00
parent ff354ec3a7
commit cff71e4806

View File

@@ -32,10 +32,10 @@ class PackageTranspilationRegistry {
console.log(">>>>> REMOVING: " + packagePath)
delete this.configByPackagePath[packagePath]
const packagePathWithSep = packagePath.endsWith(path.sep) ?
packagePath : packagePath + path.sep;
path.join(packagePath) : path.join(packagePath) + path.sep;
Object.keys(this.specByFilePath).forEach(filePath => {
console.log('checking if ' + filePath + ' starts with ' + packagePathWithSep)
if (filePath.startsWith(packagePathWithSep)) {
if (path.join(filePath).startsWith(packagePathWithSep)) {
console.log(' >> REMOVING ' + filePath)
delete this.specByFilePath[filePath]
}