@@ -313,7 +313,7 @@ var processDiagnosticMessagesTs = path.join(scriptsDirectory, "processDiagnostic
313313var diagnosticMessagesJson = path . join ( compilerDirectory , "diagnosticMessages.json" ) ;
314314var diagnosticInfoMapTs = path . join ( compilerDirectory , "diagnosticInformationMap.generated.ts" ) ;
315315
316- file ( processDiagnosticMessagesTs )
316+ file ( processDiagnosticMessagesTs ) ;
317317
318318// processDiagnosticMessages script
319319compileFile ( processDiagnosticMessagesJs ,
@@ -338,12 +338,50 @@ file(diagnosticInfoMapTs, [processDiagnosticMessagesJs, diagnosticMessagesJson],
338338 complete ( ) ;
339339 } ) ;
340340 ex . run ( ) ;
341- } , { async : true } )
341+ } , { async : true } ) ;
342342
343343desc ( "Generates a diagnostic file in TypeScript based on an input JSON file" ) ;
344- task ( "generate-diagnostics" , [ diagnosticInfoMapTs ] )
344+ task ( "generate-diagnostics" , [ diagnosticInfoMapTs ] ) ;
345345
346346
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+
347385// Local target to build the compiler and services
348386var tscFile = path . join ( builtLocalDirectory , compilerFilename ) ;
349387compileFile ( tscFile , compilerSources , [ builtLocalDirectory , copyright ] . concat ( compilerSources ) , [ copyright ] , /*useBuiltCompiler:*/ false ) ;
@@ -440,11 +478,11 @@ file(specMd, [word2mdJs, specWord], function () {
440478 child_process . exec ( cmd , function ( ) {
441479 complete ( ) ;
442480 } ) ;
443- } , { async : true } )
481+ } , { async : true } ) ;
444482
445483
446484desc ( "Generates a Markdown version of the Language Specification" ) ;
447- task ( "generate-spec" , [ specMd ] )
485+ task ( "generate-spec" , [ specMd ] ) ;
448486
449487
450488// 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() {
576614 exec ( cmd , deleteTemporaryProjectOutput ) ;
577615} , { async : true } ) ;
578616
579- desc ( "Generates code coverage data via instanbul" )
617+ desc ( "Generates code coverage data via instanbul" ) ;
580618task ( "generate-code-coverage" , [ "tests" , builtLocalDirectory ] , function ( ) {
581619 var cmd = 'istanbul cover node_modules/mocha/bin/_mocha -- -R min -t ' + testTimeout + ' ' + run ;
582620 console . log ( cmd ) ;
@@ -619,7 +657,7 @@ task("runtests-browser", ["tests", "browserify", builtLocalDirectory], function(
619657function getDiffTool ( ) {
620658 var program = process . env [ 'DIFF' ]
621659 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." ) ;
623661 }
624662 return program ;
625663}
@@ -628,14 +666,14 @@ function getDiffTool() {
628666desc ( "Diffs the compiler baselines using the diff tool specified by the 'DIFF' environment variable" ) ;
629667task ( 'diff' , function ( ) {
630668 var cmd = '"' + getDiffTool ( ) + '" ' + refBaseline + ' ' + localBaseline ;
631- console . log ( cmd )
669+ console . log ( cmd ) ;
632670 exec ( cmd ) ;
633671} , { async : true } ) ;
634672
635673desc ( "Diffs the RWC baselines using the diff tool specified by the 'DIFF' environment variable" ) ;
636674task ( 'diff-rwc' , function ( ) {
637675 var cmd = '"' + getDiffTool ( ) + '" ' + refRwcBaseline + ' ' + localRwcBaseline ;
638- console . log ( cmd )
676+ console . log ( cmd ) ;
639677 exec ( cmd ) ;
640678} , { async : true } ) ;
641679
0 commit comments