Convert SVG to JSX
From .svg
<svg xmlns="http://www.w3.org/2000/svg">
<g>…</g>
</svg>
To .js
import React from "react";
export default = (
<svg xmlns="http://www.w3.org/2000/svg">
<g>…</g>
</svg>
);
$ porg [options] <path>
Options:
-d, --delete delete source file(s)
-r, --recursive process folders recursively
-V, --version output the version number
-h, --help output usage information
git | node 8 | npm
yarn brew install yarn --without-node
$ git clone git@github.com:monospaced/porg.git
$ cd porg
$ yarn && yarn link
$ porg ./test/test.svg
./test/test.js
$ porg ./test
./test/test.js
./test/etc.js
…