-
-
Notifications
You must be signed in to change notification settings - Fork 424
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
is there a way to ignore svgs that have already been converted in a directory? #54
Comments
There is no way to do it out of the box, but I suggest you to convert all svg to a temporary directory, then copy only new files. You can do it using
I probably missed some Does it solve your problem? |
Sorry I think i miscommunicated a little...I get the svgs from invision but download them as static files into the project tree rather than retrieve them from a host. Dont know much about rsync but I dont think that helps me in this case? |
Yes, so you download them, place it in "svg-folder" then you edit them if you want, then you run "svgr + rsync". |
@CammyMurrie does it solve your problem? |
This is what I do:
"svgr": "svgr src/assets/svg/new --out-dir src/components/svg",
"postsvgr": "yarn svgr:sync",
"svgr:sync": "rsync -r src/assets/svg/new/. src/assets/svg",
"postsvgr:sync": "rm -rf src/assets/svg/new && mkdir src/assets/svg/new", |
I think we could add this feature in SVGR now. I reopen it! |
@neoziro Awesome, I am guessing this would require improvements on the config file. Can we add support for outDir and templatePath there too? outDir seems to not work at all from the config file, as for template, it currently only accepts a function. |
@sonaye yes of course, we have to fix that. |
See #182. |
The use case I have is that the majority of the time I need to amend the created jsx file to peel out
<g>
tags and the like because where I download them from (InVision i.e. the tool I use at my place of work for designs) can sometimes change the svg's in funny ways which causes problems when rendering.Given that I never have all the svgs I need at once I don't want to have to run my script for each individual, new svg I bring in to my project but at the moment I am having to due to the current script using the template and overwriting each file that has been created previously.
The text was updated successfully, but these errors were encountered: