Skip to content

monospaced/porg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Porg

Convert SVG to JSX

porg.svg

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>
);

Usage

$ 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

Dependencies

git | node 8 | npm

yarn brew install yarn --without-node

Installation

$ git clone [email protected]:monospaced/porg.git
$ cd porg
$ yarn && yarn link

Examples

File

$ porg ./test/test.svg

./test/test.js

Directory

$ porg ./test

./test/test.js
./test/etc.js
…

Releases

No releases published

Packages

No packages published