Skip to content

Commit

Permalink
Fix update-paddingY and verify-paddingY scripts after component -> el…
Browse files Browse the repository at this point in the history
…ement rename
  • Loading branch information
taysea committed Nov 20, 2024
1 parent c4b1c1b commit 4ee6754
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
7 changes: 7 additions & 0 deletions design-tokens/src/scripts/update-paddingY.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,13 @@ nonComponentTokens.forEach(category => {
delete updated[category];
});

writeFileSync(
'./tokens/component/element.default.json',
JSON.stringify({ element: updated.element }, null, 2),
);

delete updated.element;

writeFileSync(
'./tokens/component/component.default.json',
JSON.stringify(updated, null, 2),
Expand Down
4 changes: 3 additions & 1 deletion design-tokens/src/scripts/verify-paddingY.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,9 @@ export const descend = (
const paddingY = (minHeight - lineHeight - 2 * borderWidth) / 2;
if (paddingY !== value.paddingY.$value)
console.error(
`🛑 ${keyPath.join('.')}: ${paddingY} does not match ${
`🛑 ${keyPath.join(
'.',
)}: Expected value ${paddingY} does not match existing value ${
value.paddingY.$value
}. Run paddingY:update if this change is expected.`,
);
Expand Down

0 comments on commit 4ee6754

Please sign in to comment.