mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-12-12 11:50:54 -06:00
Fix issue writing too many files asynchronuslly
This commit is contained in:
parent
74e6582ffd
commit
a75a02cc7b
@ -76,8 +76,11 @@ module Commands {
|
||||
fs.mkdirSync(directoryPath);
|
||||
}
|
||||
}
|
||||
function normalizeSlashes(path: string): string {
|
||||
return path.replace(/\\/g, "/");
|
||||
}
|
||||
function transalatePath(outputFolder:string, path: string): string {
|
||||
return outputFolder + directorySeparator + path.replace(":", "");
|
||||
return normalizeSlashes(outputFolder + directorySeparator + path.replace(":", ""));
|
||||
}
|
||||
function fileExists(path: string): boolean {
|
||||
return fs.existsSync(path);
|
||||
@ -86,7 +89,7 @@ module Commands {
|
||||
var filename = transalatePath(outputFolder, f.path);
|
||||
ensureDirectoriesExist(getDirectoryPath(filename));
|
||||
console.log("writing filename: " + filename);
|
||||
fs.writeFile(filename, f.result.contents, (err) => { });
|
||||
fs.writeFileSync(filename, f.result.contents);
|
||||
});
|
||||
|
||||
console.log("Command: tsc ");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user