-
Notifications
You must be signed in to change notification settings - Fork 12
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
chore(spindle-tokens): export design token with Figma variables #1067
base: main
Are you sure you want to change the base?
Conversation
ef1c7c0
to
afdd2c2
Compare
files: [ | ||
{ | ||
destination: 'dist/json/spindle-tokens.json', | ||
format: 'json', | ||
destination: 'dist/css/spindle-tokens-animation.css', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
書き出しは今使われている設定に合わせます。(allは作ってないですが)
ref: https://unpkg.com/browse/@openameba/[email protected]/dist/css/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
それでいうとallは対応しないんです?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
使ってるのかなぁと形式変わっちゃうしなぁの2点で作ってないですが、作ることもできます〜
@@ -0,0 +1,137 @@ | |||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
こりはテスト用のサンプルレスポンスです
@@ -0,0 +1,101 @@ | |||
{ | |||
"Drop Shadow": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ShadowはFigmaから書き出すよさが今の所ないので、手動で作ってます。
files: [ | ||
{ | ||
destination: 'dist/json/spindle-tokens.json', | ||
format: 'json', | ||
destination: 'dist/css/spindle-tokens-animation.css', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
それでいうとallは対応しないんです?
} | ||
|
||
export function transformPrimitiveColor(variables: GetLocalVariablesResponse) { | ||
const primitiveColorCollections = Object.values( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
variables.meta.variableCollections
のエラーハンドリングあってもいいかなと思ったんですけど。
token配信してエラーになるケース。ないですよね。大丈夫か。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
export -> PRで確認 -> CSSにして配信 というフローなので大丈夫そうですがどうでしょか!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
大丈夫そうですね。OKす。
transformAnimationProperty, | ||
} from '../lib/animation-transformer'; | ||
|
||
const FIGMA_FILE_KEY = 'st60hCtXaGsXQCnCwNS9Dy'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
このキーって見えてて大丈夫なものなんです?
(イマイチわかってない)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@MasatoHonda 確認済みです! #1102 でも埋め込んでます〜 (URLの一部です)
c0946e3
to
3c21d90
Compare
デザイントークンの書き出し元をFigma StylesからFigma Variablesに変更しました。それに伴いトークンの形式をDesign Tokens Community Group specに変更しています。
※ style-dictionary v4で対応してたのでちょうどよかった :js_peace:
大まかな対応は以下の通りです