Skip to content

Commit

Permalink
docs(generator): add more options in generator
Browse files Browse the repository at this point in the history
  • Loading branch information
junghyeonsu committed Mar 22, 2024
1 parent 1ef6f48 commit 0307916
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions packages/generator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,28 @@ generate({
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",
},
},
});
```
Expand All @@ -48,6 +70,8 @@ generate({
- [pdfkit (PDF)](https://pdfkit.org/docs/getting_started.html#document-structure)
- [svg-to-pdfkit (PDF)](https://github.com/alafr/SVG-to-PDFKit)
- [svgr (React Components)](https://react-svgr.com/)
- [svgtofont (Font Files)](https://www.npmjs.com/package/svgtofont)
- [opentype.js (Flutter Icons)](https://github.com/opentypejs/opentype.js)

you configure each library options in `config` object.
If you want to see real example, you can see [here (seed-icon)](https://github.com/daangn/seed-icon/blob/main/icona.js)

0 comments on commit 0307916

Please sign in to comment.