Skip to content

Commit 4d6e66e

Browse files
committed
Copy assets at the end
1 parent 4f6376a commit 4d6e66e

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/link.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -106,12 +106,12 @@ module.exports = function link(config, args) {
106106
})
107107
.filter(dependency => dependency);
108108

109-
const tasks = dependencies.map(dependency => () => {
109+
const tasks = Promise.all(dependencies.map(dependency => {
110110
const pre = promisify(dependency.config.commands.prelink || commandStub);
111111
const post = promisify(dependency.config.commands.postlink || commandStub);
112112

113113
return pre().then(() => linkDependency(project, dependency)).then(post);
114-
});
114+
}));
115115

116116
const assets = uniq(
117117
dependencies.reduce(
@@ -121,7 +121,5 @@ module.exports = function link(config, args) {
121121
asset => path.basename(asset)
122122
);
123123

124-
tasks.push(() => linkAssets(project, assets));
125-
126-
return Promise.all(tasks.map(task => task()));
124+
return tasks.then(() => linkAssets(project, assets));
127125
};

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy