CLI version of svgson
npm i -g svgson-cli
svgson icon.svg --output icon.json
svgson input [options]
If specified file
or folder
with .svg
files, otherwise stdin
Output filename
Type: string
Default: stdout
Alias: o
Prettyfied output
Type: boolean
Default: false
Alias: p
Create separated output files
Works only with folder input
Type: boolean
Default: false
Alias: s
Camelcase attributes names
Type: boolean
Default: false
Alias: c
Example using svgo
svgo --input=svgs/icon-1.svg --output=- | svgson --pretty > icon-1.json
svgson Transform SVG into Object
element-to-path Convert SVG element into path
path-that-svg Convert entire SVG with path
svg-path-tools Tools to manipulate SVG path
(d)
MIT © Lionel T