Skip to content

Commit a75a02c

Browse files
committed
Fix issue writing too many files asynchronuslly
1 parent 74e6582 commit a75a02c

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

scripts/ior.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,11 @@ module Commands {
7676
fs.mkdirSync(directoryPath);
7777
}
7878
}
79+
function normalizeSlashes(path: string): string {
80+
return path.replace(/\\/g, "/");
81+
}
7982
function transalatePath(outputFolder:string, path: string): string {
80-
return outputFolder + directorySeparator + path.replace(":", "");
83+
return normalizeSlashes(outputFolder + directorySeparator + path.replace(":", ""));
8184
}
8285
function fileExists(path: string): boolean {
8386
return fs.existsSync(path);
@@ -86,7 +89,7 @@ module Commands {
8689
var filename = transalatePath(outputFolder, f.path);
8790
ensureDirectoriesExist(getDirectoryPath(filename));
8891
console.log("writing filename: " + filename);
89-
fs.writeFile(filename, f.result.contents, (err) => { });
92+
fs.writeFileSync(filename, f.result.contents);
9093
});
9194

9295
console.log("Command: tsc ");

0 commit comments

Comments
 (0)