Commit 899d5fb1 authored by Dan Allen's avatar Dan Allen

define fallback sink function as default argument [skip ci]

parent 48019be7
...@@ -9,7 +9,7 @@ const requireFromString = require('require-from-string') ...@@ -9,7 +9,7 @@ const requireFromString = require('require-from-string')
const vfs = require('vinyl-fs') const vfs = require('vinyl-fs')
const yaml = require('js-yaml') const yaml = require('js-yaml')
module.exports = (src, dest, siteSrc, siteDest, onComplete, layouts = {}) => () => module.exports = (src, dest, siteSrc, siteDest, sink = () => map((_0, _1, next) => next()), layouts = {}) => () =>
Promise.all([ Promise.all([
loadSampleUiModel(siteSrc), loadSampleUiModel(siteSrc),
toPromise(merge(compileLayouts(src, layouts), registerPartials(src), registerHelpers(src))), toPromise(merge(compileLayouts(src, layouts), registerPartials(src), registerHelpers(src))),
...@@ -30,7 +30,7 @@ module.exports = (src, dest, siteSrc, siteDest, onComplete, layouts = {}) => () ...@@ -30,7 +30,7 @@ module.exports = (src, dest, siteSrc, siteDest, onComplete, layouts = {}) => ()
}) })
) )
.pipe(vfs.dest(siteDest)) .pipe(vfs.dest(siteDest))
.pipe(onComplete ? onComplete() : map((file, enc, next) => next())) .pipe(sink())
) )
function loadSampleUiModel (siteSrc) { function loadSampleUiModel (siteSrc) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment