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 {
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 " ) ;
You can’t perform that action at this time.
0 commit comments