Skip to content

Commit

Permalink
Basic readme
Browse files Browse the repository at this point in the history
  • Loading branch information
visualfanatic committed Sep 24, 2018
1 parent 1cba729 commit 5be1902
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<h1 align="center">svg-to-vue</h1>
<p align="center">Utility to convert SVG code into Vue component definition</p>

## Instalation
``` bash
npm i svg-to-vue

yarn add svg-to-vue
```

## Usage
``` js
const svgToVue = require('svg-to-vue');

const svg = `
<svg width="300" height="200" xmlns="http://www.w3.org/2000/svg">
<rect width="100%" height="100%" fill="red" />
</svg>
`;

svgToVue(svg)
.then((component) => {
// `component` contains Vue component definition
console.log(component);
});
```

0 comments on commit 5be1902

Please sign in to comment.