@@ -41,6 +41,7 @@ const cmdLineOptions = minimist(process.argv.slice(2), {
4141 boolean : [ "debug" , "inspect" , "light" , "colors" , "lint" , "soft" ] ,
4242 string : [ "browser" , "tests" , "host" , "reporter" , "stackTraceLimit" ] ,
4343 alias : {
44+ b : "browser" ,
4445 d : "debug" ,
4546 t : "tests" ,
4647 test : "tests" ,
@@ -162,7 +163,10 @@ const librarySourceMap = [
162163
163164 // JavaScript + all host library
164165 { target : "lib.d.ts" , sources : [ "header.d.ts" , "es5.d.ts" ] . concat ( hostsLibrarySources ) } ,
165- { target : "lib.es6.d.ts" , sources : [ "header.d.ts" , "es5.d.ts" ] . concat ( es2015LibrarySources , hostsLibrarySources , "dom.iterable.d.ts" ) }
166+ { target : "lib.es6.d.ts" , sources : [ "header.d.ts" , "es5.d.ts" ] . concat ( es2015LibrarySources , hostsLibrarySources , "dom.iterable.d.ts" ) } ,
167+ { target : "lib.es2016.full.d.ts" , sources : [ "header.d.ts" , "es2016.d.ts" ] . concat ( es2015LibrarySources , hostsLibrarySources , "dom.iterable.d.ts" ) } ,
168+ { target : "lib.es2017.full.d.ts" , sources : [ "header.d.ts" , "es2017.d.ts" ] . concat ( es2015LibrarySources , hostsLibrarySources , "dom.iterable.d.ts" ) } ,
169+ { target : "lib.esnext.full.d.ts" , sources : [ "header.d.ts" , "esnext.d.ts" ] . concat ( es2015LibrarySources , hostsLibrarySources , "dom.iterable.d.ts" ) } ,
166170] . concat ( es2015LibrarySourceMap , es2016LibrarySourceMap , es2017LibrarySourceMap , esnextLibrarySourceMap ) ;
167171
168172const libraryTargets = librarySourceMap . map ( function ( f ) {
@@ -384,7 +388,7 @@ function prependCopyright(outputCopyright: boolean = !useDebugMode) {
384388}
385389
386390gulp . task ( builtLocalCompiler , /*help*/ false , [ servicesFile ] , ( ) => {
387- const localCompilerProject = tsc . createProject ( "src/compiler/tsconfig.json" , getCompilerSettings ( { } , /*useBuiltCompiler*/ true ) ) ;
391+ const localCompilerProject = tsc . createProject ( "src/compiler/tsconfig.json" , getCompilerSettings ( { } , /*useBuiltCompiler*/ true ) ) ;
388392 return localCompilerProject . src ( )
389393 . pipe ( newer ( builtLocalCompiler ) )
390394 . pipe ( sourcemaps . init ( ) )
@@ -395,14 +399,14 @@ gulp.task(builtLocalCompiler, /*help*/ false, [servicesFile], () => {
395399} ) ;
396400
397401gulp . task ( servicesFile , /*help*/ false , [ "lib" , "generate-diagnostics" ] , ( ) => {
398- const servicesProject = tsc . createProject ( "src/services/tsconfig.json" , getCompilerSettings ( { removeComments : false } , /*useBuiltCompiler*/ false ) ) ;
402+ const servicesProject = tsc . createProject ( "src/services/tsconfig.json" , getCompilerSettings ( { removeComments : false } , /*useBuiltCompiler*/ false ) ) ;
399403 const { js, dts} = servicesProject . src ( )
400404 . pipe ( newer ( servicesFile ) )
401405 . pipe ( sourcemaps . init ( ) )
402406 . pipe ( servicesProject ( ) ) ;
403407 const completedJs = js . pipe ( prependCopyright ( ) )
404408 . pipe ( sourcemaps . write ( "." ) ) ;
405- const completedDts = dts . pipe ( prependCopyright ( /*outputCopyright*/ true ) )
409+ const completedDts = dts . pipe ( prependCopyright ( /*outputCopyright*/ true ) )
406410 . pipe ( insert . transform ( ( contents , file ) => {
407411 file . path = standaloneDefinitionsFile ;
408412 return contents . replace ( / ^ ( \s * ) ( e x p o r t ) ? c o n s t e n u m ( \S + ) { ( \s * ) $ / gm, "$1$2enum $3 {$4" ) ;
@@ -429,7 +433,7 @@ gulp.task(servicesFile, /*help*/ false, ["lib", "generate-diagnostics"], () => {
429433// cancellationToken.js
430434const cancellationTokenJs = path . join ( builtLocalDirectory , "cancellationToken.js" ) ;
431435gulp . task ( cancellationTokenJs , /*help*/ false , [ servicesFile ] , ( ) => {
432- const cancellationTokenProject = tsc . createProject ( "src/server/cancellationToken/tsconfig.json" , getCompilerSettings ( { } , /*useBuiltCompiler*/ true ) ) ;
436+ const cancellationTokenProject = tsc . createProject ( "src/server/cancellationToken/tsconfig.json" , getCompilerSettings ( { } , /*useBuiltCompiler*/ true ) ) ;
433437 return cancellationTokenProject . src ( )
434438 . pipe ( newer ( cancellationTokenJs ) )
435439 . pipe ( sourcemaps . init ( ) )
@@ -442,7 +446,7 @@ gulp.task(cancellationTokenJs, /*help*/ false, [servicesFile], () => {
442446// typingsInstallerFile.js
443447const typingsInstallerJs = path . join ( builtLocalDirectory , "typingsInstaller.js" ) ;
444448gulp . task ( typingsInstallerJs , /*help*/ false , [ servicesFile ] , ( ) => {
445- const cancellationTokenProject = tsc . createProject ( "src/server/typingsInstaller/tsconfig.json" , getCompilerSettings ( { } , /*useBuiltCompiler*/ true ) ) ;
449+ const cancellationTokenProject = tsc . createProject ( "src/server/typingsInstaller/tsconfig.json" , getCompilerSettings ( { } , /*useBuiltCompiler*/ true ) ) ;
446450 return cancellationTokenProject . src ( )
447451 . pipe ( newer ( typingsInstallerJs ) )
448452 . pipe ( sourcemaps . init ( ) )
@@ -455,7 +459,7 @@ gulp.task(typingsInstallerJs, /*help*/ false, [servicesFile], () => {
455459const serverFile = path . join ( builtLocalDirectory , "tsserver.js" ) ;
456460
457461gulp . task ( serverFile , /*help*/ false , [ servicesFile , typingsInstallerJs , cancellationTokenJs ] , ( ) => {
458- const serverProject = tsc . createProject ( "src/server/tsconfig.json" , getCompilerSettings ( { } , /*useBuiltCompiler*/ true ) ) ;
462+ const serverProject = tsc . createProject ( "src/server/tsconfig.json" , getCompilerSettings ( { } , /*useBuiltCompiler*/ true ) ) ;
459463 return serverProject . src ( )
460464 . pipe ( newer ( serverFile ) )
461465 . pipe ( sourcemaps . init ( ) )
@@ -479,7 +483,7 @@ gulp.task(tsserverLibraryFile, /*help*/ false, [servicesFile], (done) => {
479483 js . pipe ( prependCopyright ( ) )
480484 . pipe ( sourcemaps . write ( "." ) )
481485 . pipe ( gulp . dest ( "src/server" ) ) ,
482- dts . pipe ( prependCopyright ( /*outputCopyright*/ true ) )
486+ dts . pipe ( prependCopyright ( /*outputCopyright*/ true ) )
483487 . pipe ( insert . transform ( ( content ) => {
484488 return content + "\r\nexport = ts;\r\nexport as namespace ts;" ;
485489 } ) )
@@ -551,7 +555,7 @@ gulp.task("LKG", "Makes a new LKG out of the built js files", ["clean", "dontUse
551555// Task to build the tests infrastructure using the built compiler
552556const run = path . join ( builtLocalDirectory , "run.js" ) ;
553557gulp . task ( run , /*help*/ false , [ servicesFile ] , ( ) => {
554- const testProject = tsc . createProject ( "src/harness/tsconfig.json" , getCompilerSettings ( { } , /*useBuiltCompiler*/ true ) ) ;
558+ const testProject = tsc . createProject ( "src/harness/tsconfig.json" , getCompilerSettings ( { } , /*useBuiltCompiler*/ true ) ) ;
555559 return testProject . src ( )
556560 . pipe ( newer ( run ) )
557561 . pipe ( sourcemaps . init ( ) )
@@ -757,7 +761,7 @@ gulp.task("browserify", "Runs browserify on run.js to produce a file suitable fo
757761 browserify ( intoStream ( file . contents ) , { debug : true } )
758762 . bundle ( ( err , res ) => {
759763 // assumes file.contents is a Buffer
760- const maps = JSON . parse ( convertMap . fromSource ( res . toString ( ) , /*largeSource*/ true ) . toJSON ( ) ) ;
764+ const maps = JSON . parse ( convertMap . fromSource ( res . toString ( ) , /*largeSource*/ true ) . toJSON ( ) ) ;
761765 delete maps . sourceRoot ;
762766 maps . sources = maps . sources . map ( s => path . resolve ( s === "_stream_0.js" ? "built/local/_stream_0.js" : s ) ) ;
763767 // Strip browserify's inline comments away (could probably just let sorcery do this, but then we couldn't fix the paths)
@@ -775,7 +779,7 @@ gulp.task("browserify", "Runs browserify on run.js to produce a file suitable fo
775779 } ) ;
776780 const finalMap = chain . apply ( ) ;
777781 file . sourceMap = finalMap ;
778- next ( undefined , file ) ;
782+ next ( /*err*/ undefined , file ) ;
779783 } ) ;
780784 } ) )
781785 . pipe ( sourcemaps . write ( "." , { includeContent : false } ) )
@@ -1024,7 +1028,7 @@ gulp.task("lint", "Runs tslint on the compiler sources. Optional arguments are:
10241028 const fileMatcher = cmdLineOptions [ "files" ] ;
10251029 const files = fileMatcher
10261030 ? `src/**/${ fileMatcher } `
1027- : "Gulpfile.ts 'src/**/*.ts' --exclude src/lib/es5.d.ts --exclude 'src/lib/*.generated.d.ts'" ;
1031+ : "Gulpfile.ts 'scripts/tslint/*.ts' ' src/**/*.ts' --exclude src/lib/es5.d.ts --exclude 'src/lib/*.generated.d.ts'" ;
10281032 const cmd = `node node_modules/tslint/bin/tslint ${ files } --format stylish` ;
10291033 console . log ( "Linting: " + cmd ) ;
10301034 child_process . execSync ( cmd , { stdio : [ 0 , 1 , 2 ] } ) ;
0 commit comments