Skip to content

Commit 85414a2

Browse files
committed
build: Update the broccoli scripts to 1.0
1 parent cae1370 commit 85414a2

File tree

7 files changed

+419
-514
lines changed

7 files changed

+419
-514
lines changed

addon/ng2/blueprints/ng2/files/ember-cli-build.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ module.exports = function(defaults) {
77
vendorNpmFiles: []
88
});
99
return app.toTree();
10-
}
10+
};

addon/ng2/blueprints/ng2/files/src/tsconfig.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
},
1818

1919
"files": [
20-
"app/main.ts",
20+
"app.ts",
2121
"typings.d.ts"
2222
]
2323
}

lib/broccoli/angular2-app.js

+6-8
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ Angular2App.prototype.toTree = function() {
2121
var sourceDir = 'src';
2222

2323
var sourceTree = new Funnel('src', {
24+
include: ['*.ts', '**/*.ts', '**/*.d.ts'],
2425
destDir: 'src'
2526
});
2627

@@ -48,26 +49,23 @@ Angular2App.prototype.toTree = function() {
4849
}
4950

5051
var tsconfig = JSON.parse(fs.readFileSync('src/tsconfig.json', 'utf-8'));
51-
var tsConfigCompilerOptions = tsconfig.compilerOptions;
52-
5352

5453
// 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) {
5655
return path.join(process.cwd(), sourceDir, name)
5756
});
5857

5958
// TODO(i): kill rootFilePaths in broccoli-typescript and use tsconfig.json#files instead
60-
tsConfigCompilerOptions.rootFilePaths = tsConfigCompilerOptions.rootFilePaths.
59+
tsconfig.rootFilePaths = tsconfig.rootFilePaths.
6160
concat(tsconfig.files.map(function(p) {
6261
// TODO(i): this is a hack - for some reason we need to prefix all paths with srcDir because
6362
// tsc's "rootDir" doesn't take effect when resolving "files" paths
6463
return path.join(sourceDir, p);
6564
}));
6665

67-
6866
var srcAndTypingsTree = mergeTrees([sourceTree, typingsTree]);
6967

70-
var tsTree = compileWithTypescript(srcAndTypingsTree, tsConfigCompilerOptions);
68+
var tsTree = new compileWithTypescript(srcAndTypingsTree, tsconfig);
7169

7270
tsTree = new Funnel(tsTree, {
7371
srcDir: 'src',
@@ -113,10 +111,10 @@ Angular2App.prototype.toTree = function() {
113111
jsTree,
114112
this.index(),
115113
vendorNpmTree,
116-
thirdPartyJs
114+
thirdPartyJs,
117115
], { overwrite: true });
118116

119-
return mergeTrees([merged, new SwManifest(merged)]);
117+
return mergeTrees([merged, new SwManifest([merged])]);
120118
};
121119

122120
/**

0 commit comments

Comments
 (0)