trigo
v0.0.4
Published
An icon solution for web
Downloads
346
Readme
Trigo
An icon solution for web.
Features
- Use
<svg>
icons in your web pages. - Better performance as icons are inlined in html.
- Support css customize and animation.
- Support tree-shaking unused icons.
- Support svg optimizing.
Usage
trigo icons/**/*.svg --out icons.js
In your code:
import { iconName } from "./icons"
console.log(iconName)
Options
-o, --out <path> Specific the output file path
--tpl <content> Specific the output template. Support variables: $name, $svg, $string, $path, $viewBox, $markdown
--postfix <name> Specific the variable name postfix
--height <size> Resize icons to specific height
--min Optimize size of svg
--minWidth <size> Resize icons to specific width
--removeColor Remove colors in svg
--removeTitle Remove titles in svg
--removeRoot Remove root in svg
--removeAttrs <attrs> Remove attributes in svg
--offsetX <size> translate icons horizontally
--offsetY <size> translate icons vertically
-v, -V, --version Print version
-h, -?, --help Print the message