gulp-pandoc-pdf
v0.2.0
Published
gulp plugin for generating PDFs via pandoc.
Downloads
11
Readme
gulp-pandoc-pdf
gulp
plugin for generating PDFs via pandoc
.
Based off the excellent gulp-pandoc plugin.
Generating PDFs with pandoc
requires the use of the --output
flag
to write the file to disk, rather than just the -t
flag allowing the
data to be streamed through gulp
pipes.
This plugin simplifies generating the PDFs in the output directory
you desire whilst also piping the data through the gulp
pipeline in
HTML format.
Installation
# shell
npm install gulp-pandoc-pdf --save-dev
Usage
Within gulpfile.js
:
// javascript
var pdf = require('gulp-pandoc-pdf');
gulp.task('build', function() {
gulp.src('src/markdown/**/*.md')
.pipe(pdf({
pdfDir: 'build/pdf'
}))
.pipe(gulp.dest('build/html'));
});
API
pdf(options)
options.pdfDir
Type: string
Path to the directory into which the generated PDF files will be
placed. This is relative to gulpfile.js
. E.g. build/pdf
.
This parameter is mandatory.
options.args
Type: array
Additional command line parameters to pandoc
.
E.g. ['--smart', '--css=style.css']
.
Licenses
Refer to the LICENSE
file for details.