Skip to content

Commit 604f5eb

Browse files
committed
Merge remote-tracking branch 'upstream/master' into webpack
2 parents 1ed07c0 + 72bc9d9 commit 604f5eb

File tree

4 files changed

+41
-10
lines changed

4 files changed

+41
-10
lines changed

lib/broccoli/angular2-app.js

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -147,13 +147,6 @@ class Angular2App extends BroccoliPlugin {
147147
}));
148148
}
149149

150-
// Add the public folder in.
151-
buildTrees.push(new BroccoliFunnel(this._inputNode, {
152-
allowEmpty: true,
153-
srcDir: 'public',
154-
name: 'PublicFolderFunnel'
155-
}));
156-
157150
var merged = new BroccoliMergeTrees(buildTrees, { overwrite: true });
158151

159152
if (this.ngConfig.apps[0].mobile) {
@@ -167,6 +160,15 @@ class Angular2App extends BroccoliPlugin {
167160
merged = this._getBundleTree(merged);
168161
}
169162

163+
// Public folder funnel
164+
var publicFolder = new BroccoliFunnel(this._inputNode, {
165+
allowEmpty: true,
166+
srcDir: 'public',
167+
name: 'PublicFolderFunnel'
168+
});
169+
170+
merged = new BroccoliMergeTrees([merged, publicFolder]);
171+
170172
return new BroccoliFunnel(merged, {
171173
destDir: this._destDir,
172174
overwrite: true

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@
114114
"exists-sync": "0.0.3",
115115
"minimatch": "^3.0.0",
116116
"mocha": "^2.4.5",
117-
"mock-fs": "^3.8.0",
117+
"mock-fs": "3.10.0",
118118
"object-assign": "^4.0.1",
119119
"rewire": "^2.5.1",
120120
"sinon": "^1.17.3",

scripts/publish/shrinkwrap.js

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
#!/usr/bin/env node
2+
'use strict';
3+
4+
5+
function removeResolvedKeys(json) {
6+
if (json['resolved']) {
7+
delete json['resolved'];
8+
}
9+
if (json['_resolved']) {
10+
delete json['_resolved'];
11+
}
12+
13+
const deps = json['dependencies'] || {};
14+
for (const key of Object.keys(deps)) {
15+
deps[key] = removeResolvedKeys(deps[key]);
16+
}
17+
18+
return json;
19+
}
20+
21+
22+
const fs = require('fs');
23+
const path = require('path');
24+
25+
const shrinkwrapPath = path.join(__dirname, '../../npm-shrinkwrap.json');
26+
const shrinkwrap = JSON.parse(fs.readFileSync(shrinkwrapPath, 'utf-8'));
27+
28+
const newJson = removeResolvedKeys(shrinkwrap);
29+
fs.writeFileSync(shrinkwrapPath, JSON.stringify(newJson, null, 2), 'utf-8');

tests/acceptance/github-pages-deploy.spec.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,15 +45,15 @@ describe('Acceptance: ng github-pages:deploy', function() {
4545
.then(() => process.chdir('./tmp'))
4646
.then(() => ng(['new', project, '--skip-npm', '--skip-bower']))
4747
.then(() => setupDist())
48-
.then(() => execStub = new ExecStub());
48+
.finally(() => execStub = new ExecStub());
4949
});
5050

5151
afterEach(function() {
5252
this.timeout(10000);
5353
return tmp.teardown('./tmp')
5454
.then(() => expect(execStub.hasFailed()).to.be.false)
5555
.then(() => expect(execStub.hasEmptyStack()).to.be.true)
56-
.then(() => execStub.restore());
56+
.finally(() => execStub.restore());
5757
});
5858

5959
it('should fail with uncommited changes', function() {

0 commit comments

Comments
 (0)