Skip to content

Commit 384f601

Browse files
author
Rafal Sroka
committed
Update readme
1 parent 7c0d762 commit 384f601

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

README.md

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,6 @@ Additionally, the following Swift file will be created to use colors from the co
8585
static var backgroundVideo: UIColor { return UIColor(named: #function)! }
8686
...
8787
}
88-
8988
```
9089

9190
For SwiftUI the following Swift file will be created to use colors from the code.
@@ -99,7 +98,6 @@ For SwiftUI the following Swift file will be created to use colors from the code
9998
static var backgroundVideo: Color { return Color(#function) }
10099
...
101100
}
102-
103101
```
104102

105103
If you set option `useColorAssets: False` in the configuration file, then will be generated code like this:
@@ -221,6 +219,7 @@ Example of these files:
221219

222220
Colors will be exported to `values/colors.xml` and `values-night/colors.xml` files.
223221
For Jetpack Compose, following code will be generated, if configured:
222+
224223
```kotlin
225224
package com.redmadrobot.androidcomposeexample.ui.figmaexport
226225

@@ -234,6 +233,7 @@ fun Colors.backgroundPrimary(): Color = colorResource(id = R.color.background_pr
234233
```
235234

236235
Icons will be exported to `drawable` directory as vector xml files. For Jetpack Compose, following code will be generated, if configured:
236+
237237
```kotlin
238238
package com.redmadrobot.androidcomposeexample.ui.figmaexport
239239

@@ -260,6 +260,7 @@ Vector images will be exported to `drawable` and `drawable-night` directories as
260260
Raster images will be exported to `drawable-???dpi` and `drawable-night-???dpi` directories as `png` or `webp` files.
261261

262262
Typography will be exported to `values/typography.xml`. For Jetpack Compose, following code will be generated, if configured:
263+
263264
```kotlin
264265
package com.redmadrobot.androidcomposeexample.ui.figmaexport
265266

@@ -290,16 +291,20 @@ object Typography {
290291
[Download](https://github.com/RedMadRobot/figma-export/releases) the latest release and read [Usage](#usage)
291292

292293
### Homebrew
293-
```
294+
295+
```bash
294296
brew install RedMadRobot/formulae/figma-export
295297
```
298+
296299
If you want to export raster images in WebP format install [cwebp](https://developers.google.com/speed/webp/docs/using) command line utility.
297-
```
300+
301+
```bash
298302
brew install webp
299303
```
300304

301305
### CocoaPods + Fastlane
302306
Add the following line to your Podfile:
307+
303308
```ruby
304309
pod 'FigmaExport'
305310
```
@@ -308,6 +313,7 @@ This will download the FigmaExport binaries and dependencies in `Pods/` during y
308313
`pod install` execution and will allow you to invoke it via `Pods/FigmaExport/Release/figma-export` in your Fastfile.
309314

310315
Add the following line to your Fastfile:
316+
311317
```ruby
312318
lane :sync_colors do
313319
Dir.chdir("../") do
@@ -321,6 +327,7 @@ Don't forget to place figma-export.yaml file at the root of the project director
321327
Run `fastlane sync_colors` to run FigmaExport.
322328

323329
## Usage
330+
324331
1. Open `Terminal.app`
325332
2. Go (cd) to the folder with `figma-export` binary file
326333
3. Run `figma-export`
@@ -413,7 +420,8 @@ Example of `figma-export.yaml` file for iOS project — [Examples/Example/figma-
413420
Example of `figma-export.yaml` file for Android project — [Examples/AndroidExample/figma-export.yaml](./Examples/AndroidExample/figma-export.yaml)
414421

415422
Generate `figma-export.yaml` config file using one of the following command:
416-
```
423+
424+
```bash
417425
figma-export init --platform android
418426
figma-export init --platform ios
419427
```

0 commit comments

Comments
 (0)