-
-
Notifications
You must be signed in to change notification settings - Fork 427
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
add ability to run svgr in sync mode #106
Comments
I think it is already done https://github.com/evenchange4/svgr.macro. And for the sync mode, the answer is no. I prefer to keep it asynchronous. |
@neoziro I understand that the preferred method is async, but sometimes there are reasons why you would run in sync mode, e.g. this macro. the macro currently is using a execSync function from child process, it'd be nice to have an API so you don't have to run a separate process. Also, it'd be cool to support a glob pattern. TLDR, the reason why I'm asking is @evenchange4 's current implementation is incredibly slow do to the way the code is executed. |
Yes, but I don't know if it is even possible to run it synchronously. Let's reopen it. |
Follow up in #185. |
@neoziro I was thinking of creating a svgr/macro to run svgr as a macro but realize when writing a macro the code needs to run synchronously. Do you think we could make a sync option for svgr to add this functionality?
The text was updated successfully, but these errors were encountered: