3.0.3 • Published 5 years ago
react-svg-loader-cli v3.0.3
react-svg-loader-cli
Provides CLI: svg2react
CLI of react-svg-loader
Install
npm i react-svg-loader-cli --save-dev
# or with yarn
yarn add react-svg-loader-cli --dev
Install it globally,
npm i -g react-svg-loader-cli
# or with yarn
yarn global add react-svg-loader-cli
Usage (svg2react)
Use this CLI to convert svg files to react components. This is helpful when you'd want to customize your svg component by hand.
`npm bin`/svg2react file1.svg file2.svg
and the following files will be emitted
file1.svg.react.js
file2.svg.react.js
in the SAME directory as the files
CLI Options
--jsx
: Outputs JSX code instead of compiling it to JavaScript using babel-preset-react--stdout
: Outputs to STDOUT--svgo <config_file>
: Supports SVGO Config YAML / JSON / JS--svgo.plugins <...plugins>
: Takes in an array of plugins that need to be enabled--svgo.plugins.<plugin> <true|false>
: - Enable/Disable the plugin--svgo.floatPrecision $N
: Set floatPrecision toN
for SVGO. SVGO supports 1-8.
`npm bin`/svg2react file1.svg --jsx --stdout
LICENSE
3.0.4-alpha.3
5 years ago
3.0.4-alpha.2
5 years ago
3.0.3
5 years ago
3.0.2
5 years ago
3.0.2-alpha.2
5 years ago
3.0.2-alpha.1
5 years ago
3.0.1
5 years ago
3.0.0
5 years ago
2.1.1-alpha.36
5 years ago
2.2.0-alpha.90436959
6 years ago
2.2.0-alpha.b8e3c6d5
6 years ago
2.2.0-alpha.02daccb2
6 years ago
2.2.0-alpha.10f9a762
6 years ago
2.2.0-alpha.038ff855
6 years ago
2.2.0-alpha.52f0a7dd
6 years ago
2.2.0-alpha.a1496904
6 years ago
2.2.0-nightly.58aa6b3c
6 years ago
2.2.0-alpha.58aa6b3c
6 years ago
2.1.0
7 years ago
2.0.0
7 years ago
2.0.0-alpha.4
7 years ago