New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add template options #20
Conversation
Hi @janbiasi - thank you so much for the PR! It looks really good, though there are just a few things I'd like to change, one you may not like, so here it is: While adding option maps for different asset types ( I'd rather leave granular control to the config file, so you could specify options, custom paths and templates for each individual asset type only by defining it in JSON in the How does that sound, reasonable? |
@@ -11,6 +11,6 @@ | |||
"esModuleInterop": true | |||
}, | |||
"typeRoots": ["node_modules/@types"], | |||
"exclude": ["node_modules", "lib"], | |||
"exclude": ["node_modules", "lib", "**/__tests__", "**/__mocks__"], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This makes tests
and mocks
fallback to default TS config, which generates warnings and is quite unpredictable - would rather add this change it test files had their own configuration.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree, it would make sense to have a tsconfig.test.json
for the test files; I've excluded the mocks and tests because they were also compiled and were included in the compiled output which isn't very great imo 😅
For the time being I merged with a couple of changes (no cli options), so you can start using it but only with the config / API - but I'd like to keep the conversation open, it was more to get this out soon as it's very good stuff and other PRs depend on it :) Available in version |
Thanks a lot for the positive feedback, really appreciate it :) And as you mentioned, I totally forgot about the CLI options 🤦 my fault, sorry! And in regards of the tsconfig; I'll reply above to your feedback :) |
We use icon-font-generator in same bash scripts with cpoint option called in line command. In fantasticon I would have preferred to access it via CLI and not in a config file... by the way you are the main dev :-) |
Take a look at #12 for all details
CLI
--css-template
flag--html-template
flag--sass-template
flag--scss-template
flagModule
template
object where you can define template paths for custom CSS, HTML, SASS and SCSS templatesprocess.cwd()
per default if the path is not absoluteSASS & SCSS templates
By default it will generate a variable for the font name (
$<name>-font
) as well as a map for the icons ($<name>-map
) so the developers can pick their icon viamap-get($example-map, 'my-icon')