Miss any of our Open RFC calls?Watch the recordings here! »

vue-img-renderer

1.0.3 • Public • Published

vue-img-renderer

NPM library to convert vue to image it use combination of vueify and puppeteer to create image from vue template file

usage

  const vueImgRenderer = require('vue-img-renderer');

vueImgRenderer(jspath, outputpath, options)

  • jspath <string> javascipt of main vue element currently accepts only script that inject to #app
  • outputpath <string> path for the image eg. 'test.png'
  • option <object> options object
  • return <Promise> a promise

example

const vueImgRenderer = require('vue-img-renderer');
 
const path = require('path');
vueImgRenderer(path.resolve(__dirname, './TestD3/main.js'), 'test.png', {
    fileType: 'png',
    width: 500,
    height: 500
  }).then(() => {
    console.log("finished");
  }).catch((err) => {
    console.log(err);
  });
 

Keywords

none

Install

npm i vue-img-renderer

DownloadsWeekly Downloads

2

Version

1.0.3

License

MIT

Last publish

Collaborators

  • avatar