Merge pull request #1 from oraclesorg/master

update to latest
This commit is contained in:
oceanapplications 2017-10-29 11:22:41 -04:00 committed by GitHub
commit b89c704eff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 2 deletions

View File

@ -47,7 +47,15 @@ function replaceAllImportsInCurrentLayer(i, importObjs, updatedFileContent, dir,
} else {
if (!variables.importedSrcFiles.hasOwnProperty(path.basename(dir + importObj.dependencyPath))) {
console.log("!!!" + importObj.dependencyPath + " SOURCE FILE NOT FOUND. TRY TO FIND IT RECURSIVELY!!!");
findFile.byNameAndReplace(dir.substring(0, dir.lastIndexOf("/")), path.basename(importObj.dependencyPath), updatedFileContent, importStatement, function(_updatedFileContent) {
var directorySeperator;
if (process.platform === "win32") {
directorySeperator = "\\";
} else {
directorySeperator = "/";
}
findFile.byNameAndReplace(dir.substring(0, dir.lastIndexOf(directorySeperator)), path.basename(importObj.dependencyPath), updatedFileContent, importStatement, function(_updatedFileContent) {
i++;
console.log("###" + importObj.dependencyPath + " SOURCE FILE FOUND###");
replaceAllImportsInCurrentLayer(i, importObjs, _updatedFileContent, dir, cb);
@ -61,4 +69,4 @@ function replaceAllImportsInCurrentLayer(i, importObjs, updatedFileContent, dir,
} else cb(updatedFileContent);
}
module.exports = replaceAllImportsInCurrentLayer;
module.exports = replaceAllImportsInCurrentLayer;