NPM library to convert vue to image it use combination of vueify and puppeteer to create image from vue template file
const vueImgRenderer = require('vue-img-renderer');
-
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
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);
});