Skip to content

Commit b9959fe

Browse files
author
Ray Cohen
committed
pipe yarn build output to stdout and stderr
1 parent 589a4d0 commit b9959fe

File tree

1 file changed

+5
-12
lines changed

1 file changed

+5
-12
lines changed

index.js

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ module.exports = {
6868
var options = {};
6969

7070
return new RSVP.Promise(function(resolve, reject) {
71-
exec('PUBLIC_URL=' + self.readConfig('publicURL') + ' yarnpkg run build', options, function(error, stdout, stderr) {
71+
const buildProcess = exec('PUBLIC_URL=' + self.readConfig('publicURL') + ' yarnpkg run build', options, function(error, stdout, stderr) {
7272
if (error) {
7373
reject(error);
7474
return;
@@ -89,17 +89,10 @@ module.exports = {
8989
distFiles: files
9090
});
9191
});
92-
}).then(function(results) {
93-
return new RSVP.Promise(function(resolve, reject) {
94-
exec('ls', options, function(error, stdout, stderr) {
95-
if (error) {
96-
reject();
97-
return;
98-
}
99-
resolve(results);
100-
});
101-
});
102-
});
92+
93+
buildProcess.stdout.pipe(process.stdout);
94+
buildProcess.stderr.pipe(process.stderr);
95+
})
10396
}
10497
});
10598

0 commit comments

Comments
 (0)