@@ -21,6 +21,7 @@ Angular2App.prototype.toTree = function() {
21
21
var sourceDir = 'src' ;
22
22
23
23
var sourceTree = new Funnel ( 'src' , {
24
+ include : [ '*.ts' , '**/*.ts' , '**/*.d.ts' ] ,
24
25
destDir : 'src'
25
26
} ) ;
26
27
@@ -48,26 +49,23 @@ Angular2App.prototype.toTree = function() {
48
49
}
49
50
50
51
var tsconfig = JSON . parse ( fs . readFileSync ( 'src/tsconfig.json' , 'utf-8' ) ) ;
51
- var tsConfigCompilerOptions = tsconfig . compilerOptions ;
52
-
53
52
54
53
// TODO(i): why do we need these additional paths? remove?
55
- tsConfigCompilerOptions . rootFilePaths = this . additionalPaths . map ( function ( name ) {
54
+ tsconfig . rootFilePaths = this . additionalPaths . map ( function ( name ) {
56
55
return path . join ( process . cwd ( ) , sourceDir , name )
57
56
} ) ;
58
57
59
58
// TODO(i): kill rootFilePaths in broccoli-typescript and use tsconfig.json#files instead
60
- tsConfigCompilerOptions . rootFilePaths = tsConfigCompilerOptions . rootFilePaths .
59
+ tsconfig . rootFilePaths = tsconfig . rootFilePaths .
61
60
concat ( tsconfig . files . map ( function ( p ) {
62
61
// TODO(i): this is a hack - for some reason we need to prefix all paths with srcDir because
63
62
// tsc's "rootDir" doesn't take effect when resolving "files" paths
64
63
return path . join ( sourceDir , p ) ;
65
64
} ) ) ;
66
65
67
-
68
66
var srcAndTypingsTree = mergeTrees ( [ sourceTree , typingsTree ] ) ;
69
67
70
- var tsTree = compileWithTypescript ( srcAndTypingsTree , tsConfigCompilerOptions ) ;
68
+ var tsTree = new compileWithTypescript ( srcAndTypingsTree , tsconfig ) ;
71
69
72
70
tsTree = new Funnel ( tsTree , {
73
71
srcDir : 'src' ,
@@ -113,10 +111,10 @@ Angular2App.prototype.toTree = function() {
113
111
jsTree ,
114
112
this . index ( ) ,
115
113
vendorNpmTree ,
116
- thirdPartyJs
114
+ thirdPartyJs ,
117
115
] , { overwrite : true } ) ;
118
116
119
- return mergeTrees ( [ merged , new SwManifest ( merged ) ] ) ;
117
+ return mergeTrees ( [ merged , new SwManifest ( [ merged ] ) ] ) ;
120
118
} ;
121
119
122
120
/**
0 commit comments