@@ -91,6 +91,15 @@ module.exports = function(grunt) {
9191 var angularExcludes = angularConflicts . map ( function ( file ) {
9292 return '!' + file ;
9393 } ) ;
94+ var nonES6Files = [
95+ 'es-collections.d.ts' ,
96+ 'es6-promise.d.ts' ,
97+ 'es6.d.ts' ,
98+ 'weakmap.d.ts' ,
99+ ] ;
100+ var es6Excludes = nonES6Files . map ( function ( file ) {
101+ return '!' + file ;
102+ } ) ;
94103 var dtsFiles = grunt . file . expand ( { cwd : srcDir } , [
95104 "**/*.d.ts" ,
96105 //Exclude the d.ts files in the apps folder - these are part of the apps and are already packed there!
@@ -108,13 +117,13 @@ module.exports = function(grunt) {
108117 "!tns-core-modules.base.d.ts" ,
109118 "!references.d.ts" ,
110119 "!webworker.es2016.d.ts"
111- ] . concat ( localCfg . defaultExcludes ) . concat ( angularExcludes ) ) ;
120+ ] . concat ( localCfg . defaultExcludes ) . concat ( es6Excludes ) . concat ( angularExcludes ) ) ;
112121 dtsFiles . sort ( ) ;
113122
114123 writeDtsFile ( dtsFiles , outDir , 'tns-core-modules/tns-core-modules.base.d.ts' ) ;
115124 var es6Files = angularConflicts . concat ( [ 'tns-core-modules.base.d.ts' ] ) ;
116125 writeDtsFile ( es6Files , outDir , 'tns-core-modules/tns-core-modules.es6.d.ts' ) ;
117- var allFiles = angularConflicts . concat ( [ 'tns-core-modules.base.d.ts' ] ) ;
126+ var allFiles = angularConflicts . concat ( nonES6Files ) . concat ( [ 'tns-core-modules.base.d.ts' ] ) ;
118127 writeDtsFile ( allFiles , outDir , 'tns-core-modules/tns-core-modules.d.ts' ) ;
119128 }
120129
@@ -312,59 +321,6 @@ module.exports = function(grunt) {
312321 dest : "<%= grunt.option('path') %>/node_modules/tns-core-modules/" ,
313322 }
314323 } ,
315- ts : {
316- build : {
317- tsconfig : {
318- tsconfig : 'tsconfig.json' ,
319- passThrough : true ,
320- } ,
321- outDir : localCfg . outDir ,
322- dest : localCfg . outDir ,
323- options : tsOptions
324- } ,
325- buildNodeTests : {
326- src : [
327- 'tns-core-modules/js-libs/easysax/**/*.ts' ,
328- 'tns-core-modules/module.d.ts' ,
329- 'tns-core-modules/xml/**/*.ts' ,
330- 'tns-core-modules/lib.core.d.ts' ,
331- 'tns-core-modules/lib.dom.d.ts' ,
332- 'tns-core-modules/es-collections.d.ts' ,
333- 'tns-core-modules/declarations.d.ts' ,
334- 'tns-core-modules/es6-promise.d.ts' ,
335- 'node-tests/**/*.ts'
336- ] ,
337- outDir : localCfg . outDir ,
338- dest : localCfg . outDir ,
339- options : tsOptions
340- } ,
341- buildDts : {
342- src : [
343- 'tns-core-modules/**/*.d.ts' ,
344- '!org.nativescript.widgets.d.ts' ,
345- '!**/*.android.d.ts' ,
346- '!**/node_modules/**/*' ,
347- '!**/platforms/**/*' ,
348- '!bin/**/*' ,
349- '!**/references.d.ts' ,
350- '!tns-core-modules/references.d.ts' ,
351- '!tns-core-modules/android17.d.ts' ,
352- '!tns-core-modules/ios/**/*' ,
353- '!tns-core-modules/org.nativescript.widgets.d.ts' ,
354- ] ,
355- outDir : localCfg . outDir ,
356- dest : localCfg . outDir ,
357- options : tsOptions
358- } ,
359- testCombinedDts : {
360- src : [
361- path . join ( localCfg . outTnsCoreModules , 'tns-core-modules.d.ts' ) ,
362- ] ,
363- outDir : localCfg . outDir ,
364- dest : localCfg . outDir ,
365- options : Object . assign ( { } , tsOptions , { noLib : false } )
366- }
367- } ,
368324 tslint : {
369325 build : {
370326 files : {
@@ -391,6 +347,10 @@ module.exports = function(grunt) {
391347 callback : assignGitSHA
392348 }
393349 } ,
350+ compileAll : "npm run compile-all" ,
351+ compileNodeTests : "npm run compile-node-tests" ,
352+ compileCheckBaseDts : "npm run compile-check-base-dts" ,
353+ compileCheckCombinedDts : "npm run compile-check-combined-dts" ,
394354 } ,
395355 simplemocha : {
396356 node : {
@@ -422,7 +382,6 @@ module.exports = function(grunt) {
422382
423383 grunt . loadNpmTasks ( "grunt-contrib-clean" ) ;
424384 grunt . loadNpmTasks ( "grunt-contrib-copy" ) ;
425- grunt . loadNpmTasks ( "grunt-ts" ) ;
426385 grunt . loadNpmTasks ( "grunt-tslint" ) ;
427386 grunt . loadNpmTasks ( "grunt-exec" ) ;
428387 grunt . loadNpmTasks ( "grunt-shell" ) ;
@@ -437,8 +396,8 @@ module.exports = function(grunt) {
437396 ] ) ;
438397
439398 grunt . registerTask ( "compile-ts" , [
440- "ts:buildDts " ,
441- "ts:build " ,
399+ "shell:compileCheckBaseDts " ,
400+ "shell:compileAll " ,
442401 "clean:typeScriptLeftovers" ,
443402 "copy:childPackageFiles"
444403 ] ) ;
@@ -499,12 +458,12 @@ module.exports = function(grunt) {
499458 "copy:definitionFiles" ,
500459 "copy:jsLibs" ,
501460 "generate-tns-core-modules-dts" ,
502- "ts:testCombinedDts " ,
461+ "shell:compileCheckCombinedDts " ,
503462 ] ) ;
504463
505464 grunt . registerTask ( "node-tests" , [
506465 "clean:nodeTests" ,
507- "ts:buildNodeTests " ,
466+ "shell:compileNodeTests " ,
508467 "copy:childPackageFiles" ,
509468 "copy:jsLibs" ,
510469 "env:nodeTests" ,
0 commit comments