Skip to content
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

how i make multiple replace #233

Closed
gwmaster opened this issue Nov 15, 2018 · 4 comments
Closed

how i make multiple replace #233

gwmaster opened this issue Nov 15, 2018 · 4 comments
Labels

Comments

@gwmaster
Copy link

this work :

npx @svgr/cli -d assets/svgr assets/svg --replace-attr-values "#3abca7={props.color1}"  --replace-attr-values "hid1={props.hid1}"

but i need for every value use --replace-attr-values its possible use multiple in one
and help write this as webpack package.json script
right now i use it as

"scripts": {
   "SVGR":"npx @svgr/cli -d assets/svgr assets/svg --replace-attr-values '#3abca7={props.color1}'  --replace-attr-values 'hid1={props.hid1}'"
}
@gregberge
Copy link
Owner

Hello @gwmaster, I am sorry but I don't understand your problem. Can you try to explain it better?

@firefox0102
Copy link

I think he's trying to say that he needs to replace multiple attribute values, and he's currently just adding --replace-attr-values for every single one. He's looking for a way to include multiple replacement values in one go.

@gregberge
Copy link
Owner

Yeah but it is not currently possible, I am sorry this is the way to handle it in CLI.

@gregberge gregberge added the v5 Released in v5 label Dec 23, 2019
@gregberge
Copy link
Owner

In v5, you would be able to use , as separator:

npx @svgr/cli -d assets/svgr assets/svg --replace-attr-values "#3abca7={props.color1},hid1={props.hid1}"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants