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

feat(tokens): export json, remove duplicate file generation #3529

Merged
merged 1 commit into from
Jan 30, 2025

Conversation

castastrophe
Copy link
Collaborator

@castastrophe castastrophe commented Jan 29, 2025

Description

Add JSON to token package exports.

Remove CSS files from commit history (but continue to build and ship them in the releases).

Stop physically copying the dist/css/index.css to dist/index.css and instead, map dist/index.css in the package exports to the same dist/css/index.css file.

How and where has this been tested?

Please tag yourself on the tests you've marked complete to confirm the tests have been run by someone other than the author.

Validation steps

Expect to see the bundled index.css files for the tokens dist output not reflected in diffs for a pull request. Expect the files to continue to be generated.

  • Alter the @adobe/spectrum-tokens package version being used by tokens.
  • Run yarn builder tokens --skip-nx-cache. Do not commit the changes.
  • Expect not to see the index.css asset listed in the files staged or unstaged for commit.
  • Expect to see changes reflected in the *-vars.css and the tokens.json resource.
  • Expect to see changes reflected when you run yarn compare tokens.

To-do list

  • I have read the contribution guidelines.
  • I have updated relevant storybook stories and templates.
  • I have tested these changes in Windows High Contrast mode.
  • If my change impacts other components, I have tested to make sure they don't break.
  • If my change impacts documentation, I have updated the documentation accordingly.
  • ✨ This pull request is ready to merge. ✨

@castastrophe castastrophe added the skip_vrt Add to a PR to skip running VRT (but still pass the action) label Jan 29, 2025
@castastrophe castastrophe self-assigned this Jan 29, 2025
Copy link

changeset-bot bot commented Jan 29, 2025

🦋 Changeset detected

Latest commit: cb797cb

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@spectrum-css/tokens Minor
@spectrum-css/preview Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@castastrophe castastrophe force-pushed the feat-update-token-exports branch from 0f1a610 to c02f58d Compare January 29, 2025 21:58
Copy link
Contributor

github-actions bot commented Jan 29, 2025

🚀 Deployed on https://pr-3529--spectrum-css.netlify.app

@castastrophe castastrophe force-pushed the feat-update-token-exports branch from c02f58d to ff379d3 Compare January 29, 2025 22:02
Copy link
Contributor

github-actions bot commented Jan 29, 2025

File metrics

Summary

Total size: 3.25 MB*
Total change (Δ): 🟢 ⬇ 201.77 KB (-5.72%)

Table reports on changes to a package's main file. Other changes can be found in the collapsed Details section below.

Package Size Δ
tokens 🚨 deleted/moved 🟢 ⬇ 201.95 KB

Details

tokens

Filename Head Compared to base
css/dark-vars.css 48.04 KB 🔴 ⬆ 0.04 KB (0.07%)
css/global-vars.css 44.20 KB 🔴 ⬆ 0.04 KB (0.08%)
css/index.css 201.96 KB 🔴 ⬆ 0.01 KB (0.00%)
css/large-vars.css 32.08 KB 🔴 ⬆ 0.04 KB (0.11%)
css/light-vars.css 48.00 KB 🔴 ⬆ 0.04 KB (0.07%)
css/medium-vars.css 32.24 KB 🔴 ⬆ 0.04 KB (0.11%)
json/tokens.json 289.94 KB -
index.css 🚨 deleted/moved ⬇ 201.95 KB
* Size determined by adding together the size of the main file for all packages in the library.
* Results are not gzipped or minified.
* An ASCII character in UTF-8 is 8 bits or 1 byte.

@castastrophe castastrophe force-pushed the feat-update-token-exports branch from ff379d3 to 5d902f9 Compare January 29, 2025 22:13
@castastrophe castastrophe requested a review from pfulton January 29, 2025 22:16
@castastrophe castastrophe added size-2 S ~6-18hrs; not hard or time consuming, one or two work days to complete. build Issues associated with the build process; often a refactor labels Jan 29, 2025
@castastrophe castastrophe force-pushed the feat-update-token-exports branch 4 times, most recently from b508873 to 85e4739 Compare January 30, 2025 21:02
@castastrophe castastrophe force-pushed the feat-update-token-exports branch from 85e4739 to cb797cb Compare January 30, 2025 21:05
@pfulton pfulton merged commit 3d08cea into main Jan 30, 2025
12 checks passed
@pfulton pfulton deleted the feat-update-token-exports branch January 30, 2025 21:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Issues associated with the build process; often a refactor ready-for-review size-2 S ~6-18hrs; not hard or time consuming, one or two work days to complete. skip_vrt Add to a PR to skip running VRT (but still pass the action)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants