diff --git a/addon/ng2/blueprints/ng2/files/public/.gitignore b/addon/ng2/blueprints/ng2/files/public/.gitignore new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/lib/broccoli/angular2-app.js b/lib/broccoli/angular2-app.js index 1e3fc27c639a..725b62d6b167 100644 --- a/lib/broccoli/angular2-app.js +++ b/lib/broccoli/angular2-app.js @@ -87,10 +87,15 @@ Angular2App.prototype.toTree = function () { destDir: 'vendor' }); + var publicDirTree = new Funnel('public', { + allowEmpty: true + }); + var merged = mergeTrees([ assetTree, tsTree, jsTree, + publicDirTree, this.index(), vendorNpmTree ], { overwrite: true }); diff --git a/tests/e2e/e2e_workflow.spec.js b/tests/e2e/e2e_workflow.spec.js index 21d7c36d5c8c..bd980e5fee7f 100644 --- a/tests/e2e/e2e_workflow.spec.js +++ b/tests/e2e/e2e_workflow.spec.js @@ -176,6 +176,22 @@ describe('Basic end-to-end Workflow', function () { }); }); + it('moves all files that live inside `public` into `dist`', function () { + this.timeout(420000); + + const tmpFile = path.join(process.cwd(), 'public', 'test.abc'); + const tmpFileLocation = path.join(process.cwd(), 'dist', 'test.abc'); + fs.writeFileSync(tmpFile, 'hello world'); + + return ng(['build', '--silent']) + .then(function () { + expect(existsSync(tmpFileLocation)); + }) + .catch(err => { + throw new Error(err) + }); + }); + it('Turn on `noImplicitAny` in tsconfig.json and rebuild', function (done) { this.timeout(420000);