Last active
August 23, 2016 15:55
-
-
Save kristelteng/15936e47a60cc652c8a53c68b8748422 to your computer and use it in GitHub Desktop.
extract tarball and convert md to html in tc-docs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let tarballPipe; | |
gulp.task('makeTarballPipe', async function() { | |
let markdownStream = lazypipe() | |
.pipe(markdown) | |
.pipe(pug, {template: 'layout/layout.pug'}); | |
let tarStream = await tarball.getTarball(); | |
let tarPipe = tarStream | |
.pipe(extract()) | |
.pipe(gulpif('*.md', markdownStream())); | |
tarballPipe = tarPipe; | |
return tarPipe; | |
}); | |
gulp.task('webserver', ['makeTarballPipe'], () => { | |
let s = site(); | |
s.add(tarballPipe); | |
return s.pipe(virtual_webserver({debug: true})); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment