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

Allow more complex attribute replacement behaviors #205

Closed
amanda-mitchell opened this issue Oct 5, 2018 · 1 comment
Closed

Allow more complex attribute replacement behaviors #205

amanda-mitchell opened this issue Oct 5, 2018 · 1 comment

Comments

@amanda-mitchell
Copy link

🚀 Feature Proposal

It would be super cool if the --replace-attr-values feature allowed substitution of javascript expressions instead of just strings, for example

Motivation

Our application contains a number of assets that can be rethemed by swapping out a color palette. Having a way to dynamically replace the colors in the original image with values from a palette would enable us to simplify our designers' workflows.

Example

Perhaps if the replacement value is surrounded by curly braces, it could be treated as an expression instead of a string?

--replace-attr-values "#063855={props.primaryColor}"

While this would be a breaking change, it seems unlikely (to me, anyway) that there would be valid uses of this syntax already in the wild.

Pitch

It seems like a relatively natural extension of the replacement feature.

@Venablena
Copy link

+1 This is the exact same feature I'm after right now.

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

No branches or pull requests

3 participants