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 do i omit core/global tokens from my output token list? #988

Open
stephen-salyer opened this issue Jun 19, 2023 · 2 comments
Open

How do i omit core/global tokens from my output token list? #988

stephen-salyer opened this issue Jun 19, 2023 · 2 comments

Comments

@stephen-salyer
Copy link

I do not want core/global tokens in my final theme css files. How do i get rid of them but still use them as a reference?

@acidlynx
Copy link

acidlynx commented Jun 28, 2023

Hello! I use the same snippet for excluding
The main value is function inside "filter"

    "ios-swift-colors": {
      "transformGroup": "ios-swift",
      "buildPath": "build/ios/",
      "files": [
        {
          "destination": "UITokens+Colors.swift",
          "format": "ios/color.swift",
          "className": "Color",
          "filter": function(token) {
            // omit core-tokens
            if (token.type == "color" &&
                token.attributes.category != "core") {
              return token
            }
          }
        },

@alanbsmith
Copy link

This sounds similar to #523, I think. Did you see Danny's comment here?

#523 (comment)

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