File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -76,8 +76,11 @@ module Commands {
76
76
fs . mkdirSync ( directoryPath ) ;
77
77
}
78
78
}
79
+ function normalizeSlashes ( path : string ) : string {
80
+ return path . replace ( / \\ / g, "/" ) ;
81
+ }
79
82
function transalatePath ( outputFolder :string , path : string ) : string {
80
- return outputFolder + directorySeparator + path . replace ( ":" , "" ) ;
83
+ return normalizeSlashes ( outputFolder + directorySeparator + path . replace ( ":" , "" ) ) ;
81
84
}
82
85
function fileExists ( path : string ) : boolean {
83
86
return fs . existsSync ( path ) ;
@@ -86,7 +89,7 @@ module Commands {
86
89
var filename = transalatePath ( outputFolder , f . path ) ;
87
90
ensureDirectoriesExist ( getDirectoryPath ( filename ) ) ;
88
91
console . log ( "writing filename: " + filename ) ;
89
- fs . writeFile ( filename , f . result . contents , ( err ) => { } ) ;
92
+ fs . writeFileSync ( filename , f . result . contents ) ;
90
93
} ) ;
91
94
92
95
console . log ( "Command: tsc " ) ;
You can’t perform that action at this time.
0 commit comments