@@ -36,7 +36,11 @@ const TaskNames = {
3636 lssl : "lssl" ,
3737 lint : "lint" ,
3838 scripts : "scripts" ,
39- localize :" localize"
39+ localize : "localize" ,
40+ configureInsiders : "configure-insiders" ,
41+ publishInsiders : "publish-insiders" ,
42+ configureNightly : "configure-nightly" ,
43+ publishNightly : "publish-nightly"
4044} ;
4145
4246const Paths = { } ;
@@ -76,6 +80,9 @@ Paths.scripts = {};
7680Paths . scripts . generateLocalizedDiagnosticMessages = "scripts/generateLocalizedDiagnosticMessages.js" ;
7781Paths . scripts . processDiagnosticMessagesJs = "scripts/processDiagnosticMessages.js" ;
7882Paths . scripts . produceLKG = "scripts/produceLKG.js" ;
83+ Paths . scripts . configurePrereleaseJs = "scripts/configurePrelease.js" ;
84+ Paths . packageJson = "package.json" ;
85+ Paths . versionFile = "src/compiler/core.ts" ;
7986
8087const ConfigFileFor = {
8188 tsc : "src/tsc" ,
@@ -179,7 +186,6 @@ task("baseline-accept-test262", function () {
179186 acceptBaseline ( Paths . baselines . localTest262 , Paths . baselines . referenceTest262 ) ;
180187} ) ;
181188
182-
183189desc ( "Runs tslint on the compiler sources. Optional arguments are: f[iles]=regex" ) ;
184190task ( TaskNames . lint , [ TaskNames . buildRules ] , ( ) => {
185191 if ( fold . isTravis ( ) ) console . log ( fold . start ( "lint" ) ) ;
@@ -206,6 +212,31 @@ task('diff-rwc', function () {
206212 exec ( cmd ) ;
207213} , { async : true } ) ;
208214
215+ task ( TaskNames . configureNightly , [ TaskNames . scripts ] , function ( ) {
216+ const cmd = `${ host } ${ Paths . scripts . configurePrelease } dev ${ Paths . packageJson } ${ Paths . versionFile } ` ;
217+ exec ( cmd , ( ) => complete ( ) ) ;
218+ } , { async : true } ) ;
219+
220+ desc ( "Configure, build, test, and publish the nightly release." ) ;
221+ task ( TaskNames . publishNightly , [ TaskNames . configureNightly , TaskNames . lkg , TaskNames . clean , "setDebugMode" , "runtests-parallel" ] , function ( ) {
222+ var cmd = "npm publish --tag next" ;
223+ console . log ( cmd ) ;
224+ exec ( cmd ) ;
225+ } ) ;
226+
227+ task ( TaskNames . configureInsiders , [ TaskNames . scripts ] , function ( ) {
228+ const cmd = `${ host } ${ Paths . scripts . configurePrelease } insiders ${ Paths . packageJson } ${ Paths . versionFile } ` ;
229+ exec ( cmd , ( ) => complete ( ) ) ;
230+ } , { async : true } ) ;
231+
232+ desc ( "Configure, build, test, and publish the insiders release." ) ;
233+ task ( TaskNames . publishInsiders , [ TaskNames . configureInsiders , TaskNames . lkg , TaskNames . clean , "setDebugMode" , "runtests-parallel" ] , function ( ) {
234+ var cmd = "npm publish --tag insiders" ;
235+ console . log ( cmd ) ;
236+ exec ( cmd ) ;
237+ } ) ;
238+
239+
209240desc ( "Sets the release mode flag" ) ;
210241task ( "release" , function ( ) {
211242 useDebugMode = false ;
0 commit comments