diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f573669..2bf9a55 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,6 +23,7 @@ jobs: DEVELOPER_DIR: /Applications/Xcode_16.4.app/Contents/Developer SWIFTLINT_VERSION: 0.52.2 DANGER_GITHUB_API_TOKEN: ${{ secrets.DANGER_GITHUB_API_TOKEN }} + FIGMAGEN_ACCESS_TOKEN: ${{ secrets.FIGMAGEN_ACCESS_TOKEN }} steps: - uses: actions/checkout@v4 - name: Ruby diff --git a/Demo/.figmagen.yml b/Demo/.figmagen.yml index 8253f18..f44d7d2 100644 --- a/Demo/.figmagen.yml +++ b/Demo/.figmagen.yml @@ -1,5 +1,6 @@ base: - accessToken: 25961-4ac9fbc9-3bd8-4c43-bbe2-95e477f8a067 + accessToken: + env: FIGMAGEN_ACCESS_TOKEN colorStyles: file: https://www.figma.com/file/61xw2FQn61Xr7VVFYwiHHy/Fugen-Demo?node-id=91%3A3 diff --git a/README.md b/README.md index 8fcc9be..a476e22 100755 --- a/README.md +++ b/README.md @@ -9,6 +9,7 @@ FigmaGen is a command line tool for exporting resources and generating code from your [Figma](http://figma.com/) files. Currently, FigmaGen supports the following entities: + - ✅ Color styles - ✅ Text styles - ✅ Shadow styles diff --git a/Sources/FigmaGen/Generators/Tokens/Contexts/TypographyToken.swift b/Sources/FigmaGen/Generators/Tokens/Contexts/TypographyToken.swift index 28d06cf..8cd2cb0 100644 --- a/Sources/FigmaGen/Generators/Tokens/Contexts/TypographyToken.swift +++ b/Sources/FigmaGen/Generators/Tokens/Contexts/TypographyToken.swift @@ -6,12 +6,20 @@ struct TypographyToken { typealias FontSizeToken = ContextToken typealias FontScaleToken = ContextToken - typealias LetterSpacingToken = ContextToken typealias LineHeightToken = ContextToken typealias TextDecorationToken = ContextToken typealias ParagraphSpacingToken = ContextToken typealias ParagraphIndentToken = ContextToken + struct LetterSpacingToken { + + // MARK: - Instance Properties + + let path: [String] + let value: String + let rawValue: String + } + // MARK: - Instance Properties let path: [String] diff --git a/Sources/FigmaGen/Generators/Tokens/Generators/Typography/DefaultTypographyTokensGenerator.swift b/Sources/FigmaGen/Generators/Tokens/Generators/Typography/DefaultTypographyTokensGenerator.swift index ea3d501..882811d 100644 --- a/Sources/FigmaGen/Generators/Tokens/Generators/Typography/DefaultTypographyTokensGenerator.swift +++ b/Sources/FigmaGen/Generators/Tokens/Generators/Typography/DefaultTypographyTokensGenerator.swift @@ -85,7 +85,8 @@ final class DefaultTypographyTokensGenerator: TypographyTokensGenerator { return TypographyToken.LetterSpacingToken( path: letterSpacingValue.components(separatedBy: "."), - value: String(round(fontLetterSpacing * 100) / 100.0) + value: String(round(fontLetterSpacing * 100) / 100.0), + rawValue: String(letterSpacing) ) }