vue-img-renderer
v1.0.3
Published
A vue to image renderer with help from vuify and puppeteer
Downloads
6
Readme
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 #appoutputpath
<string> path for the image eg. 'test.png'option
<object> options objectreturn
<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);
});