Skip to content

Instantly share code, notes, and snippets.

@kristelteng
Last active August 23, 2016 15:55
Show Gist options
  • Save kristelteng/15936e47a60cc652c8a53c68b8748422 to your computer and use it in GitHub Desktop.
Save kristelteng/15936e47a60cc652c8a53c68b8748422 to your computer and use it in GitHub Desktop.
extract tarball and convert md to html in tc-docs
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