Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions addon/ng2/blueprints/ng2/files/src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
<body>
<<%= htmlComponentName %>-app>Loading...</<%= htmlComponentName %>-app>

<script src="vendor/es6-shim/es6-shim.js"></script>
<script src="thirdparty/vendor.js"></script>
<script src="thirdparty/libs.js"></script>
<script>
Expand Down
26 changes: 14 additions & 12 deletions lib/broccoli/angular2-app.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Angular2App.prototype.toTree = function() {
'systemjs/dist/system.src.js',
'systemjs/dist/system-polyfills.js'
];

if (this.options.vendorNpmFiles) {
vendorNpmFiles = vendorNpmFiles.concat(this.options.vendorNpmFiles);
}
Expand All @@ -49,23 +49,24 @@ Angular2App.prototype.toTree = function() {
exclude: ['**/*.ts', '**/*.js', 'src/tsconfig.json'],
allowEmpty: true
});

var vendorNpmTree = new Funnel('node_modules', {
files: vendorNpmFiles,
destDir: 'vendor'
});

var vendorNpmJs = new Concat(vendorNpmTree, {
inputFiles: [ //TODO: figure out how to make it a glob that maintains the order of the files
//TODO: figure out why loading es6-shim from within here causes browser errors
// '**/es6-shim.js',
'**/system-polyfills.js',
'**/angular2-polyfills.js',
'**/system.src.js',
'**/system-polyfills.js',
'**/es6-shim.js',
'**/Rx.js',
'**/angular2.dev.js',
'**/http.dev.js',
'**/router.dev.js',
'**/upgrade.dev.js',
'**/Rx.js'
'**/upgrade.dev.js'
],
outputFile: '/thirdparty/vendor.js'
});
Expand All @@ -90,11 +91,12 @@ Angular2App.prototype.toTree = function() {
// });

return mergeTrees([
assetTree,
tsSrcTree,
tsTree,
jsTree,
this.index(),
vendorNpmTree,
assetTree,
tsSrcTree,
tsTree,
jsTree,
this.index(),
vendorNpmJs,
thirdPartyJs
], { overwrite: true });
Expand Down