0.6.0 • Published 1 month ago
@icona/generator v0.6.0
@icona/generator
Icona asset generator
Install
yarn add -D @icona/generator
Usage
import { generate } from "@icona/generator";
generate({
config: {
svg: {
active: true, // you can disable svg generator if you set false
path: "svg", // will generate svg files in svg folder
svgoConfig: {},
},
drawable: {
active: true, // you can disable drawable generator if you set false
path: "drawable", // will generate xml files in drawable folder
svg2vectordrawableConfig: {},
defaultColor: "#000000", // default color for android vector drawable
},
pdf: {
active: true, // you can disable pdf generator if you set false
path: "pdf", // will generate pdf files in pdf folder
pdfKitConfig: {},
svgToPdfOptions: {},
},
react: {
active: true, // you can disable react generator if you set false
path: "react", // will generate react component files in react folder
svgrConfig: {},
},
png: {
active: false,
genMode: "recreate",
path: "png",
},
font: {
genMode: "recreate",
active: true,
svgToFontOptions: {
src: "svg",
dist: "font",
fontName: "seed-icon",
},
},
flutter: {
active: true,
ttfPath: "font/seed-icon.ttf",
fileName: "SeedIcons",
fontFamily: "SeedIcon",
genMode: "recreate",
path: "flutter",
},
},
});
@icona/generator
use several libraries to generate assets.
- svgo (SVG)
- svg2vectordrawable (XML)
- pdfkit (PDF)
- svg-to-pdfkit (PDF)
- svgr (React Components)
- svgtofont (Font Files)
- opentype.js (Flutter Icons)
you configure each library options in config
object.
If you want to see real example, you can see here (seed-icon)
0.6.0
1 month ago
0.5.0
2 months ago
0.4.1
5 months ago
0.4.0
5 months ago
0.3.0
5 months ago
0.0.13
10 months ago
0.0.14
9 months ago
0.1.0
5 months ago
0.2.1
5 months ago
0.2.0
5 months ago
0.0.15
8 months ago
0.0.16
6 months ago
0.0.17
6 months ago
0.2.2
5 months ago
0.0.10
11 months ago
0.0.12
10 months ago
0.0.10-test.0
11 months ago
0.0.9
11 months ago
0.0.8
11 months ago
0.0.7
11 months ago
0.0.6
11 months ago
0.0.5
11 months ago
0.0.3
11 months ago
0.0.2
11 months ago