@@ -8,6 +8,7 @@ var child_process = require("child_process");
8
8
// Variables
9
9
var compilerDirectory = "src/compiler/" ;
10
10
var servicesDirectory = "src/services/" ;
11
+ var serverDirectory = "src/server/" ;
11
12
var harnessDirectory = "src/harness/" ;
12
13
var libraryDirectory = "src/lib/" ;
13
14
var scriptsDirectory = "scripts/" ;
@@ -64,8 +65,10 @@ var servicesSources = [
64
65
return path . join ( compilerDirectory , f ) ;
65
66
} ) . concat ( [
66
67
"breakpoints.ts" ,
68
+ "navigateTo.ts" ,
67
69
"navigationBar.ts" ,
68
70
"outliningElementsCollector.ts" ,
71
+ "patternMatcher.ts" ,
69
72
"services.ts" ,
70
73
"shims.ts" ,
71
74
"signatureHelp.ts" ,
@@ -90,6 +93,16 @@ var servicesSources = [
90
93
return path . join ( servicesDirectory , f ) ;
91
94
} ) ) ;
92
95
96
+ var serverSources = [
97
+ "node.d.ts" ,
98
+ "editorServices.ts" ,
99
+ "protocol.d.ts" ,
100
+ "session.ts" ,
101
+ "server.ts"
102
+ ] . map ( function ( f ) {
103
+ return path . join ( serverDirectory , f ) ;
104
+ } ) ;
105
+
93
106
var definitionsRoots = [
94
107
"compiler/types.d.ts" ,
95
108
"compiler/scanner.d.ts" ,
@@ -127,9 +140,17 @@ var harnessSources = [
127
140
"incrementalParser.ts" ,
128
141
"services/colorization.ts" ,
129
142
"services/documentRegistry.ts" ,
130
- "services/preProcessFile.ts"
143
+ "services/preProcessFile.ts" ,
144
+ "services/patternMatcher.ts"
131
145
] . map ( function ( f ) {
132
146
return path . join ( unittestsDirectory , f ) ;
147
+ } ) ) . concat ( [
148
+ "protocol.d.ts" ,
149
+ "session.ts" ,
150
+ "client.ts" ,
151
+ "editorServices.ts" ,
152
+ ] . map ( function ( f ) {
153
+ return path . join ( serverDirectory , f ) ;
133
154
} ) ) ;
134
155
135
156
var librarySourceMap = [
@@ -327,6 +348,7 @@ var tscFile = path.join(builtLocalDirectory, compilerFilename);
327
348
compileFile ( tscFile , compilerSources , [ builtLocalDirectory , copyright ] . concat ( compilerSources ) , [ copyright ] , /*useBuiltCompiler:*/ false ) ;
328
349
329
350
var servicesFile = path . join ( builtLocalDirectory , "typescriptServices.js" ) ;
351
+ var nodePackageFile = path . join ( builtLocalDirectory , "typescript.js" ) ;
330
352
compileFile ( servicesFile , servicesSources , [ builtLocalDirectory , copyright ] . concat ( servicesSources ) ,
331
353
/*prefixes*/ [ copyright ] ,
332
354
/*useBuiltCompiler*/ true ,
@@ -336,7 +358,10 @@ compileFile(servicesFile, servicesSources,[builtLocalDirectory, copyright].conca
336
358
/*preserveConstEnums*/ true ,
337
359
/*keepComments*/ false ,
338
360
/*noResolve*/ false ,
339
- /*stripInternal*/ false ) ;
361
+ /*stripInternal*/ false ,
362
+ /*callback*/ function ( ) {
363
+ jake . cpR ( servicesFile , nodePackageFile , { silent : true } ) ;
364
+ } ) ;
340
365
341
366
var nodeDefinitionsFile = path . join ( builtLocalDirectory , "typescript.d.ts" ) ;
342
367
var standaloneDefinitionsFile = path . join ( builtLocalDirectory , "typescriptServices.d.ts" ) ;
@@ -378,9 +403,12 @@ compileFile(nodeDefinitionsFile, servicesSources,[builtLocalDirectory, copyright
378
403
jake . rmRf ( tempDirPath , { silent : true } ) ;
379
404
} ) ;
380
405
406
+ var serverFile = path . join ( builtLocalDirectory , "tsserver.js" ) ;
407
+ compileFile ( serverFile , serverSources , [ builtLocalDirectory , copyright ] . concat ( serverSources ) , /*prefixes*/ [ copyright ] , /*useBuiltCompiler*/ true ) ;
408
+
381
409
// Local target to build the compiler and services
382
410
desc ( "Builds the full compiler and services" ) ;
383
- task ( "local" , [ "generate-diagnostics" , "lib" , tscFile , servicesFile , nodeDefinitionsFile ] ) ;
411
+ task ( "local" , [ "generate-diagnostics" , "lib" , tscFile , servicesFile , nodeDefinitionsFile , serverFile ] ) ;
384
412
385
413
// Local target to build only tsc.js
386
414
desc ( "Builds only the compiler" ) ;
@@ -435,7 +463,7 @@ task("generate-spec", [specMd])
435
463
// Makes a new LKG. This target does not build anything, but errors if not all the outputs are present in the built/local directory
436
464
desc ( "Makes a new LKG out of the built js files" ) ;
437
465
task ( "LKG" , [ "clean" , "release" , "local" ] . concat ( libraryTargets ) , function ( ) {
438
- var expectedFiles = [ tscFile , servicesFile , nodeDefinitionsFile , standaloneDefinitionsFile , internalNodeDefinitionsFile , internalStandaloneDefinitionsFile ] . concat ( libraryTargets ) ;
466
+ var expectedFiles = [ tscFile , servicesFile , nodePackageFile , nodeDefinitionsFile , standaloneDefinitionsFile , internalNodeDefinitionsFile , internalStandaloneDefinitionsFile ] . concat ( libraryTargets ) ;
439
467
var missingFiles = expectedFiles . filter ( function ( f ) {
440
468
return ! fs . existsSync ( f ) ;
441
469
} ) ;
@@ -542,7 +570,7 @@ task("runtests", ["tests", builtLocalDirectory], function() {
542
570
}
543
571
544
572
if ( tests && tests . toLocaleLowerCase ( ) === "rwc" ) {
545
- testTimeout = 50000 ;
573
+ testTimeout = 100000 ;
546
574
}
547
575
548
576
colors = process . env . colors || process . env . color
0 commit comments