vue-img-renderer
A vue to image renderer with help from vuify and puppeteer
Last updated 2 years ago by kicito .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install vue-img-renderer 
SYNC missed versions from official npm registry.

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);
  });

Current Tags

  • 1.0.3                                ...           latest (2 years ago)

4 Versions

  • 1.0.3                                ...           2 years ago
  • 1.0.2                                ...           2 years ago
  • 1.0.1                                ...           2 years ago
  • 1.0.0                                ...           2 years ago
Maintainers (1)
Downloads
Today 1
This Week 1
This Month 2
Last Day 0
Last Week 0
Last Month 17
Dependencies (10)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |