0.1.1 • Published 7 years ago

msvgc v0.1.1

Weekly downloads
71
License
MIT
Repository
github
Last release
7 years ago

MSVGC

Utils for generating react components from plain svg files (compatible with react-native)

Install:

# install package globally
npm install -g msvgc

Usage:

# provide for utils
msvgc -f ./path/to/pic.svg -o ./svgComponents/

--react-native flag create components using react-native-svg library

--typescript flag will using react importing like in typescript (import * as React)

import Pic from './svgComponents/Pic'

class MyComponent extends Component { render() { return (

  <div>
    <Pic width={300} height={100} />
    <p>Lorem ipsum...</p>
  </div>
);

} }

...

#### TODO:
- [ ] do creating index file in components directory for exporting created files
- [ ] do comparating with existing files in target component directory