Skip to content

Instantly share code, notes, and snippets.

@k1LoW
Last active August 29, 2015 13:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save k1LoW/9036696 to your computer and use it in GitHub Desktop.
Save k1LoW/9036696 to your computer and use it in GitHub Desktop.
var gulp = require('gulp');
var exec = require('gulp-exec');
gulp.task('pandoc', function() {
var options = {
silent: true
};
gulp.src('./input.md')
.pipe(exec('pandoc <%= file.path %> -f markdown -o output.docx', options))
.pipe(exec('pandoc <%= file.path %> -f markdown -o output.pdf -V documentclass=ltjarticle -V classoption=a4j -V classoption=landscape --latex-engine=lualatex --toc', options));
});
gulp.task('watch', function() {
gulp.watch('./input.md', function(event) {
gulp.run('pandoc');
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment