Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Remove redundant primitives renaming
Primitives are no longer included in the output, as their values are instead inlined
  • Loading branch information
aduth committed Nov 21, 2025
commit 670812a09a532870217f5d0262b366d7edca3c44
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,7 @@ function transformTokenName( { id }: { id: string } ) {
// Capitalize first segment
.replace( /^(\w+)\./g, ( _, g1 ) => `${ titleCase( g1 ) }/` )
// Capitalize
.replace( /primitive\./g, '_Primitives/' )
.replace( /semantic\./g, 'Semantic/' )
.replace(
/(color\/_Primitives)\/(\w+)\.(.*)/gi,
( _, prefix, tone, rampStep ) => {
return `${ prefix }/${ titleCase( tone ) }/${ rampStep }`;
}
)
// Color-specific transformation for semantic tokens:
// - add extra folder (Background, Foreground, Stroke)
// - swap "tone" folder order, capitalize
Expand Down