git-wt-watch
Advanced tools
Comparing version 1.2.4 to 1.2.5
@@ -57,2 +57,20 @@ // compile.js | ||
function transformHeaderPath(headerPath) | ||
{ | ||
const re = /^(([\./\-\w]+?)(\-(inl|fwd|hsm))?\.hpp)$/; | ||
const m = headerPath.match(re); | ||
if (m) | ||
{ | ||
dlog('Match array:', m); | ||
const proxy = m[2] + '.cpp'; | ||
dlog("transformHeaderPath returning proxy source path:", proxy); | ||
return proxy; | ||
} | ||
else | ||
{ | ||
dlog("transformHeaderPath: no match for:", headerPath); | ||
return null; | ||
} | ||
} | ||
function findCompileCommandObject({file, allCompileCommands}) | ||
@@ -65,12 +83,6 @@ { | ||
} else { | ||
const re = /^([\./\-\w]+)(\-[a-z]{3})?\.hpp$/; | ||
const m = file.match(re); | ||
if (m) | ||
{ | ||
const proxy = m[1] + '.cpp'; | ||
dlog(`trying proxy ${file} -> ${proxy}`); | ||
if (proxy in allCompileCommands) { | ||
dlog("findCompileCommandObject using proxy source file:", proxy); | ||
return allCompileCommands[proxy]; | ||
} | ||
const proxy = transformHeaderPath(file); | ||
if (proxy in allCompileCommands) { | ||
dlog("findCompileCommandObject using proxy source file:", proxy); | ||
return allCompileCommands[proxy]; | ||
} | ||
@@ -153,2 +165,3 @@ } | ||
loadMultipleCompileCommands, | ||
transformHeaderPath, | ||
}; |
{ | ||
"name": "git-wt-watch", | ||
"version": "1.2.4", | ||
"version": "1.2.5", | ||
"description": "Keep two git working trees synchronized", | ||
@@ -26,10 +26,13 @@ "main": "client.js", | ||
}, | ||
"bin" : { | ||
"compile-check" : "./compile-check.js", | ||
"sync-repo" : "./sync-repo.js" | ||
}, | ||
"bin": { | ||
"compile-check": "./compile-check.js", | ||
"sync-repo": "./sync-repo.js" | ||
}, | ||
"repository": { | ||
"type" : "git", | ||
"url" : "https://gitlab.com/jimlloyd/git-wt-watch.git" | ||
"type": "git", | ||
"url": "https://gitlab.com/jimlloyd/git-wt-watch.git" | ||
}, | ||
"devDependencies": { | ||
"mocha": "^6.2.2" | ||
} | ||
} |
22561
12
613
1