feat: adds public folder

Close #368
This commit is contained in:
chrisramsey 2016-03-29 20:52:25 -05:00 committed by jkuri
parent 62ea1f2b11
commit 0f7134ce38
3 changed files with 21 additions and 0 deletions

View File

View File

@ -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 });

View File

@ -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);