node-svg2android
v1.0.2
Published
A PhantomJS wrapper around svg2android for node consumption
Downloads
2
Readme
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);
});
});