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

"filePath" absolute path in SD version 3.0 #498

Closed
didoo opened this issue Dec 7, 2020 · 2 comments
Closed

"filePath" absolute path in SD version 3.0 #498

didoo opened this issue Dec 7, 2020 · 2 comments
Milestone

Comments

@didoo
Copy link
Contributor

didoo commented Dec 7, 2020

I have just updated SD to version 3.0 (rc1) and everything went perfectly smooth.
One thing I have noticed though is that the new "filePath" attribute has an absolute path:

 {
    "value": "#767676",
    "type": "color",
    "group": "mono",
    "filePath": "/Users/cristianorastelli/src/design-system/tokens/src/badoo/products/shared/color/color-mono.json",
    "isSource": true,
    "original": {
      "value": "#767676",
      "type": "color",
      "group": "mono"
    },

In our specific case, we're using a custom format that "dumps" the entire structure in a JSON file that it's used in the style guide website, and we can easily remove the "filePath" property from the output, so no big deal per se.

The question I have is: in general, why not use a relative path for this attribute? What is the benefit of having an absolute path for this? (it may cause differences when run on different machines, while the actual tokens remain the same).

@dbanksdesign
Copy link
Member

Makes total sense, opened a PR to fix this. Now filePath will be relative (or absolute if provided an absolute path in the configuration). Thanks!

@dbanksdesign dbanksdesign added this to the 3.0 milestone Dec 8, 2020
@chazzmoney
Copy link
Collaborator

Is fixed in code and will be part of 3.0.0-rc.2

Thanks @didoo and @dbanksdesign for finding and fixing respectively!

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

No branches or pull requests

3 participants