question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Removing .value from aliases

See original GitHub issue

If all values have to be defined with value, as explained by @chazzmoney in https://github.com/amzn/style-dictionary/issues/119#issuecomment-526755832 , could .value be removed from the end of all aliases (or made optional, to not break existing ones), as it is used everywhere?

Instead of this:

{
  "color": {
    "alert": { "value": "red" },
    "reference": { "value": "{color.alert.value}" }
  }
}

We could write this:

{
  "color": {
    "alert": { "value": "red" },
    "reference": { "value": "{color.alert}" }
  }
}

Not a great gain here on an example with one single alias, but nice in a larger code base.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
chazzmoneycommented, Jan 6, 2022

Added via #746

2reactions
nhoizeycommented, Mar 24, 2021

@dbanksdesign I didn’t think about transitive transforms indeed. (They are awesome btw!)

One way would be to try the alias path first, and try with the added .value only if it didn’t match.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Remove-Alias (Microsoft.PowerShell.Utility) - Microsoft Learn
The Remove-Alias cmdlet removes an alias from the current PowerShell session. To remove an alias with the Option property set to ReadOnly, use...
Read more >
How can I delete a git alias? - Stack Overflow
In case someone has multiple values for the same alias and has got that: $ git config --global --unset alias.trololo warning: alias.trololo has...
Read more >
Delete alias API | Elasticsearch Guide [8.5] | Elastic
Supports wildcards ( * ). To remove all aliases, use * or _all . (Required, string) Comma-separated list of data streams or indices...
Read more >
Deleting Aliases : - Omatic Support
I'm wanting to delete the alias all together, but when I tested this code on 1 record, it runs fine, but the alias...
Read more >
Linux alias List, Set, Create & Remove with alias Command
If you need new alias with same name than best way to remove an alias is by use the alias command to create...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found