You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
**Note:** Not all options can be specified through the command line - for `formatOptions`, `pathOptions`and `templates` use a [configuration file](#configuration-file) or the JavaScript API.
38
+
**Note:** Not all options can be specified through the command line - for `formatOptions`, `pathOptions`, `getIconId`and `templates` use a [configuration file](#configuration-file) or the JavaScript [API](#api).
39
39
40
40
```
41
41
Usage: fantasticon [options] [input-dir]
@@ -62,7 +62,7 @@ Options:
62
62
63
63
### Configuration file
64
64
65
-
Some options (specifically, `formatOptions`and `pathOptions`) cannot be passed to the CLI directly.
65
+
Some options (specifically, `formatOptions`, `pathOptions`and `getIconId`) cannot be passed to the CLI directly.
66
66
67
67
To have more control and better readability, you can create a simple configuration file.
68
68
@@ -113,7 +113,15 @@ module.exports = {
113
113
'chevron-right':57345,
114
114
'thumbs-up':57358,
115
115
'thumbs-down':57359
116
-
}
116
+
},
117
+
// Customize generated icon IDs (unavailable with `.json` config file)
You can provide a `getIconId` function via the configuration file to customize how the icon IDs / CSS selectors are derived from the filepath. The function will receive relative paths to the icon and the input directory as arguments, and must return a unique string to be used as the ID.
198
+
189
199
### Contribute
190
200
191
201
PRs are always welcome. If you need help questions, want to bounce ideas or just say hi, [join the Discord channel](https://discord.gg/BXAY3Kc3mp).
0 commit comments