Skip to content

Commit 71454a6

Browse files
committed
fix copying resources
1 parent 0dc4681 commit 71454a6

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

scripts/publish/build.js

+7-4
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ Promise.resolve()
6161
.then(() => glob(path.join(packagesRoot, '**/*')))
6262
.then(files => {
6363
console.log(` Found ${files.length} files...`);
64-
files
64+
return files
6565
.map((fileName) => path.relative(packagesRoot, fileName))
6666
.filter((fileName) => {
6767
if (/^angular-cli.blueprints/.test(fileName)) {
@@ -94,7 +94,7 @@ Promise.resolve()
9494
&& !(/\.spec\./.test(fileName))
9595
&& !(/[\/\\]tests[\/\\]/.test(fileName));
9696
})
97-
.forEach((fileName) => {
97+
.map((fileName) => {
9898
const source = path.join(packagesRoot, fileName);
9999
const dest = path.join(dist, fileName);
100100

@@ -107,9 +107,12 @@ Promise.resolve()
107107
}
108108
}
109109
} else {
110-
copy(source, dest);
110+
return copy(source, dest);
111111
}
112-
});
112+
})
113+
.reduce((promise, current) => {
114+
return promise.then(() => current);
115+
}, Promise.resolve());
113116
})
114117
.then(() => process.exit(0), (err) => {
115118
console.error(err);

0 commit comments

Comments
 (0)