ScerIO / icon_font_generator

☣️ Flutter Icon Font Generator
https://pub.dev/packages/icon_font_generator
Other
96 stars 50 forks source link

Add symlink support #27

Closed Jupi007 closed 10 months ago

Jupi007 commented 1 year ago

Usage

Create a symlinks file

For an existent icon target.svg:

{
    "symlink": "target"
}

Symlink is placed as key to avoid duplicate entries. And like this, we can create different symlink of a target.

Run cli

icon_font_generator --symlinks-map=path/to/symlinks.json ...

Error messages

If the symlink name already exist (as an existent icon or just as a symlink):

Warning: symlink "symlink" icon already exists - symlink creation skipped

If the target icon is a symlink:

Warning: target "target" icon is already a symlink - symlink creation skipped

If the target icon does not exist:

Warning: target "target" icon does not exist - symlink creation skipped

Result

static const target = _IconsData(0xf101, 'target');
static const symlink = _IconsData(0xf101, 'symlink');

Closes #26

Jupi007 commented 10 months ago

Closing, I will redo another PR updated with the most recent changes in master later.