Skip to content

nikolasmorado/pathstraightener

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PathStraightener

Straightens out svg paths into jsx/tsx files.

It's a transpiler, since SVGs are just HTML, we convert that HTML strcuture to HAST. From there we squish/straighten out out any weird svgisms and spit out a JSX/TSX component.

Usage

psx <path> <name> [options]

Arguments:

  • <path>: Relative path to an svg file. (Required)
  • <name>: Custom component name. (Optional)

Options:

  • -t or --typescript: Exports the component with typescript annotations.
  • -n or --react-native: Exports the component with React Native support.

About

Converts SVGs to JSX/TSX

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published