Module: lib/gulp-plugin

Methods

(inner) plugin(markedOpts) → {stream.Transform}

gulp plugin to replace marked-vega codeblocks with base64 image markdown tags so that any markdown parser can render the Vega or Vega-Lite charts as images. If no `markedOpts` is passed as argument, the plugin will just replace the `marked-vega` codeblocks - the output file will still be in markdown. Otherwise, the plugin will replace and render the file as HTML using marked lib.
Parameters:
Name Type Description
markedOpts Object Options to pass to `marked`.
Source:
Returns:
Type
stream.Transform
Example
const gulp = require('gulp');
const marked_vega = require('gulp-marked-vega');

gulp
  .src('./test/sample.md')
  .pipe(marked_vega())
  .pipe(gulp.dest('test/output'));