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

Add delete and restore functionality for tokens #233

Open
wants to merge 1 commit into
base: next
Choose a base branch
from

Conversation

c4rlosviteri
Copy link
Contributor

Features

  • Delete tokens when removed from source
  • Add new tokens to appropriate files based on path structure
  • Restore tokens to original files when added back
  • Create new files/directories for new token categories

Changes

  • Added file path detection for new tokens
  • Handle token restoration with correct file paths
  • Create files/directories when needed
  • Fixed reference handling for all token operations
// New token added
{
  "color": {
    "background": {
      "rating-star": {
        "disabled": {
          "$value": "{color.warm-grey-250}",
          "$type": "color",
          "filePath": "tokens/global/rating-star.json5"
        }
      }
    }
  }
}

The token is automatically added to tokens/global/rating-star.json5

Testing

Delete token → verify removal
Add new token → verify correct file creation/placement
Restore deleted token → verify restoration to the original file

ESLint

Configurations updated additionally to use standard

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

Successfully merging this pull request may close these issues.

2 participants