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

Tokens: Refactor Token Build Script #3786

Merged
merged 28 commits into from
Oct 2, 2024

Conversation

rlingineni
Copy link
Contributor

@rlingineni rlingineni commented Sep 30, 2024

Pull Request Instructions

This is a refactor of our build.js token script which was previously hard to maintain and read.

Everything now lives under the design-tokens/src directory.

File Function
formatters/* This is a place for all formatters. Formatters are used when generating files.
platforms/* This is where the output file for each platform is defined
transformers/* This contains all transformer registrations and transformation groups that are utilized by each platform.
utils/* This contains any utility functions we use. For example, a hex to rgba function.
filters.js This contains all of the filters we use in the final build when restricting to specific token sets
build.js This is the entrypoint where we build for each platform

@rlingineni rlingineni added the patch release Patch release label Sep 30, 2024
@rlingineni rlingineni requested a review from a team as a code owner September 30, 2024 22:52
Copy link

netlify bot commented Sep 30, 2024

Deploy Preview for gestalt ready!

Name Link
🔨 Latest commit 705e57e
🔍 Latest deploy log https://app.netlify.com/sites/gestalt/deploys/66fb2bbf44b7cd0008bbd0f6
😎 Deploy Preview https://deploy-preview-3786--gestalt.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

const { getIOSConfiguration } = require('./platforms/ios');
const { registerWebFormats } = require('./formatters/registerWebFormats');

StyleDictionary.registerFileHeader({
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shoudl we move this out too to keep everything isolated?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes - good idea

Copy link

netlify bot commented Sep 30, 2024

Deploy Preview for gestalt ready!

Name Link
🔨 Latest commit 8ac4f73
🔍 Latest deploy log https://app.netlify.com/sites/gestalt/deploys/66fdb9a4c64ce000080a1956
😎 Deploy Preview https://deploy-preview-3786--gestalt.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Remove component token changes
@rlingineni rlingineni force-pushed the ravi-refactor-tokenscript branch from 99e1397 to 852152f Compare October 1, 2024 16:43
@rlingineni rlingineni merged commit 65d391c into pinterest:master Oct 2, 2024
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
patch release Patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants