
- #Key for look converter how to#
- #Key for look converter install#
- #Key for look converter zip file#
- #Key for look converter archive#
While we highly recommend the use a configuration file for performance reasons (especially if you have multiple outputs, but also because it's more flexible), it's also possible to directly invoke the available parsers individually using swiftgen run:


Directly invoking a parser without a config file Lastly, you can use -help on swiftgen or one of its subcommand to see the detailed usage.
#Key for look converter how to#
The dedicated documentation explains the syntax and possibilities in details – like how to pass custom parameters to your templates, use swiftgen config lint to validate your config file, how to use alternate config files, and other tips. Then you just have to invoke swiftgen config run, or even just swiftgen for short, and it will execute what's described in the configuration file. templateName: swift5 output: Generated/Assets.swift templateName: structured-swift5 output: Generated/Strings.swift xcassets:

The config file should list all the parsers to invoke, and for each parser, the list of inputs/outputs/templates/parameters to use for it. To use SwiftGen, simply create a swiftgen.yml YAML file (either manually or using swiftgen config init) then edit it to adapt to your project. To create a sample configuration file as a starting point to adapt to your needs, run swiftgen config init.Įach parser described in the configuration file ( strings, fonts, ib, …) typically corresponds to a type of input resources to parse (strings files, IB files, Font files, JSON files, …), allowing you to generate constants for each types of those input files. SwiftGen is provided as a single command-line tool which uses a configuration file to define the various parsers to run (depending on the type of input files you need to parse) and their parameters. ❗️ If you're migrating from older SwiftGen versions, don't forget to read the Migration Guide.
#Key for look converter install#
#Key for look converter zip file#
If you unarchived the ZIP file in a folder e.g. This way, all coworkers will use the same version of SwiftGen for this project. We recommend that you unarchive the ZIP inside your project directory and commit its content to git.
#Key for look converter archive#
Extract the content of the zip archive in your project directory.Download the swiftgen-x.y.z.zip file associated with that release.Go to the GitHub page for the latest release.There are multiple possibilities to install SwiftGen on your machine or in your project, depending on your preferences and needs: Download the ZIP for the latest release

