File tree Expand file tree Collapse file tree 3 files changed +15
-6
lines changed Expand file tree Collapse file tree 3 files changed +15
-6
lines changed Original file line number Diff line number Diff line change @@ -527,14 +527,14 @@ namespace ts {
527527 const filesSeen : Map < boolean > = { } ;
528528
529529 let exclude : string [ ] = [ ] ;
530- if ( json [ "exclude" ] instanceof Array ) {
530+ if ( json [ "exclude" ] instanceof Array ) {
531531 exclude = json [ "exclude" ] ;
532532 }
533533 else {
534534 // by default exclude node_modules, and any specificied output directory
535- exclude = [ "node_modules" ]
536- let outDir = json [ "compilerOptions" ] && json [ "compilerOptions" ] [ "outDir" ] ;
537- if ( outDir ) {
535+ exclude = [ "node_modules" ] ;
536+ const outDir = json [ "compilerOptions" ] && json [ "compilerOptions" ] [ "outDir" ] ;
537+ if ( outDir ) {
538538 exclude . push ( outDir ) ;
539539 }
540540 }
Original file line number Diff line number Diff line change @@ -1288,7 +1288,6 @@ namespace ts {
12881288 const languageVersion = options . target || ScriptTarget . ES3 ;
12891289 const outFile = options . outFile || options . out ;
12901290
1291- const firstExternalModuleSourceFile = forEach ( files , f => isExternalModule ( f ) ? f : undefined ) ;
12921291 if ( options . isolatedModules ) {
12931292 const firstNonExternalModuleSourceFile = forEach ( files , f => ! isExternalModule ( f ) && ! isDeclarationFile ( f ) ? f : undefined ) ;
12941293 if ( firstNonExternalModuleSourceFile ) {
Original file line number Diff line number Diff line change @@ -7,6 +7,16 @@ module ts {
77 }
88
99 function createDefaultServerHost ( fileMap : Map < File > ) : server . ServerHost {
10+ let existingDirectories : Map < boolean > = { } ;
11+ forEachValue ( fileMap , v => {
12+ let dir = getDirectoryPath ( v . name ) ;
13+ let previous : string ;
14+ do {
15+ existingDirectories [ dir ] = true ;
16+ previous = dir ;
17+ dir = getDirectoryPath ( dir ) ;
18+ } while ( dir !== previous ) ;
19+ } ) ;
1020 return {
1121 args : < string [ ] > [ ] ,
1222 newLine : "\r\n" ,
@@ -26,7 +36,7 @@ module ts {
2636 return hasProperty ( fileMap , path ) ;
2737 } ,
2838 directoryExists : ( path : string ) : boolean => {
29- throw new Error ( "NYI" ) ;
39+ return hasProperty ( existingDirectories , path ) ;
3040 } ,
3141 createDirectory : ( path : string ) => {
3242 } ,
You can’t perform that action at this time.
0 commit comments