Skip to content

A PhantomJS wrapper around svg2android for node consumption

Notifications You must be signed in to change notification settings

dxprog/node-svg2android

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Node svg2android

A PhantomJS wrapped version of svg2android for access to nodejs applications.

Installing

npm install --save node-svg2android

Example Use

const SvgToAndroid = require('node-svg2android');

const converter = new SvgToAndroid();
converter.start().then(() => {
  converter.convert('/path/to/svg').then((result) => {
    // result.code -> This is the actual VectorDrawable code as returned by svg2android
    // result.warnings -> Any warnings raised by svg2android
    // result.error -> Errors raised by svg2android
    converter.end();
  }, (err) => {
    console.error('There was some error converting', err);
  });
});

About

A PhantomJS wrapper around svg2android for node consumption

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published