new logger for Jekyll task to show actual Jekyll output

This commit is contained in:
Matthias Kretschmann 2018-05-22 14:11:26 +02:00
parent bdec743701
commit 530f01994e
Signed by: m
GPG Key ID: 606EEEF3C479A91F
1 changed files with 7 additions and 1 deletions

View File

@ -125,7 +125,13 @@ export const jekyll = (done) => {
const jekyll = cp.execFile('bundle', ['exec', jekyll_options], { stdio: 'inherit' })
jekyll.on('error', (error) => onError() ).on('close', done)
const jekyllLogger = (buffer) => {
buffer.toString()
.split(/\n/)
.forEach((message) => console.log(message))
}
jekyll.stdout.on('data', jekyllLogger).on('close', done)
}