@@ -313,7 +313,7 @@ var processDiagnosticMessagesTs = path.join(scriptsDirectory, "processDiagnostic
313
313
var diagnosticMessagesJson = path . join ( compilerDirectory , "diagnosticMessages.json" ) ;
314
314
var diagnosticInfoMapTs = path . join ( compilerDirectory , "diagnosticInformationMap.generated.ts" ) ;
315
315
316
- file ( processDiagnosticMessagesTs )
316
+ file ( processDiagnosticMessagesTs ) ;
317
317
318
318
// processDiagnosticMessages script
319
319
compileFile ( processDiagnosticMessagesJs ,
@@ -338,12 +338,50 @@ file(diagnosticInfoMapTs, [processDiagnosticMessagesJs, diagnosticMessagesJson],
338
338
complete ( ) ;
339
339
} ) ;
340
340
ex . run ( ) ;
341
- } , { async : true } )
341
+ } , { async : true } ) ;
342
342
343
343
desc ( "Generates a diagnostic file in TypeScript based on an input JSON file" ) ;
344
- task ( "generate-diagnostics" , [ diagnosticInfoMapTs ] )
344
+ task ( "generate-diagnostics" , [ diagnosticInfoMapTs ] ) ;
345
345
346
346
347
+ // Publish nightly
348
+ var configureNightlyJs = path . join ( scriptsDirectory , "configureNightly.js" ) ;
349
+ var configureNightlyTs = path . join ( scriptsDirectory , "configureNightly.ts" ) ;
350
+ var packageJson = "package.json" ;
351
+ var programTs = path . join ( compilerDirectory , "program.ts" ) ;
352
+
353
+ file ( configureNightlyTs ) ;
354
+
355
+ compileFile ( /*outfile*/ configureNightlyJs ,
356
+ /*sources*/ [ configureNightlyTs ] ,
357
+ /*prereqs*/ [ configureNightlyTs ] ,
358
+ /*prefixes*/ [ ] ,
359
+ /*useBuiltCompiler*/ false ,
360
+ /*noOutFile*/ false ,
361
+ /*generateDeclarations*/ false ,
362
+ /*outDir*/ undefined ,
363
+ /*preserveConstEnums*/ undefined ,
364
+ /*keepComments*/ false ,
365
+ /*noResolve*/ false ,
366
+ /*stripInternal*/ false ) ;
367
+
368
+ task ( "setDebugMode" , function ( ) {
369
+ useDebugMode = true ;
370
+ } ) ;
371
+
372
+ task ( "configure-nightly" , [ configureNightlyJs ] , function ( ) {
373
+ var cmd = "node " + configureNightlyJs + " " + packageJson + " " + programTs ;
374
+ console . log ( cmd ) ;
375
+ exec ( cmd ) ;
376
+ } , { async : true } ) ;
377
+
378
+ desc ( "Configure, build, test, and publish the nightly release." ) ;
379
+ task ( "publish-nightly" , [ "configure-nightly" , "LKG" , "clean" , "setDebugMode" , "runtests" ] , function ( ) {
380
+ var cmd = "npm publish --tag next" ;
381
+ console . log ( cmd ) ;
382
+ exec ( cmd ) ;
383
+ } ) ;
384
+
347
385
// Local target to build the compiler and services
348
386
var tscFile = path . join ( builtLocalDirectory , compilerFilename ) ;
349
387
compileFile ( tscFile , compilerSources , [ builtLocalDirectory , copyright ] . concat ( compilerSources ) , [ copyright ] , /*useBuiltCompiler:*/ false ) ;
@@ -440,11 +478,11 @@ file(specMd, [word2mdJs, specWord], function () {
440
478
child_process . exec ( cmd , function ( ) {
441
479
complete ( ) ;
442
480
} ) ;
443
- } , { async : true } )
481
+ } , { async : true } ) ;
444
482
445
483
446
484
desc ( "Generates a Markdown version of the Language Specification" ) ;
447
- task ( "generate-spec" , [ specMd ] )
485
+ task ( "generate-spec" , [ specMd ] ) ;
448
486
449
487
450
488
// Makes a new LKG. This target does not build anything, but errors if not all the outputs are present in the built/local directory
@@ -576,7 +614,7 @@ task("runtests", ["tests", builtLocalDirectory], function() {
576
614
exec ( cmd , deleteTemporaryProjectOutput ) ;
577
615
} , { async : true } ) ;
578
616
579
- desc ( "Generates code coverage data via instanbul" )
617
+ desc ( "Generates code coverage data via instanbul" ) ;
580
618
task ( "generate-code-coverage" , [ "tests" , builtLocalDirectory ] , function ( ) {
581
619
var cmd = 'istanbul cover node_modules/mocha/bin/_mocha -- -R min -t ' + testTimeout + ' ' + run ;
582
620
console . log ( cmd ) ;
@@ -619,7 +657,7 @@ task("runtests-browser", ["tests", "browserify", builtLocalDirectory], function(
619
657
function getDiffTool ( ) {
620
658
var program = process . env [ 'DIFF' ]
621
659
if ( ! program ) {
622
- fail ( "Add the 'DIFF' environment variable to the path of the program you want to use." )
660
+ fail ( "Add the 'DIFF' environment variable to the path of the program you want to use." ) ;
623
661
}
624
662
return program ;
625
663
}
@@ -628,14 +666,14 @@ function getDiffTool() {
628
666
desc ( "Diffs the compiler baselines using the diff tool specified by the 'DIFF' environment variable" ) ;
629
667
task ( 'diff' , function ( ) {
630
668
var cmd = '"' + getDiffTool ( ) + '" ' + refBaseline + ' ' + localBaseline ;
631
- console . log ( cmd )
669
+ console . log ( cmd ) ;
632
670
exec ( cmd ) ;
633
671
} , { async : true } ) ;
634
672
635
673
desc ( "Diffs the RWC baselines using the diff tool specified by the 'DIFF' environment variable" ) ;
636
674
task ( 'diff-rwc' , function ( ) {
637
675
var cmd = '"' + getDiffTool ( ) + '" ' + refRwcBaseline + ' ' + localRwcBaseline ;
638
- console . log ( cmd )
676
+ console . log ( cmd ) ;
639
677
exec ( cmd ) ;
640
678
} , { async : true } ) ;
641
679
0 commit comments