forked from anmartini/weather
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathswiftgen.yml
45 lines (40 loc) · 2.26 KB
/
swiftgen.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
## In case your config entries all use a common input/output parent directory, you can specify those here.
## Every input/output paths in the rest of the config will then be expressed relative to these.
## Those two top-level keys are optional and default to "." (the directory of the config file).
input_dir: ./Sources/Resources/Resources
output_dir: ./Sources/Resources
## Generate constants for your localized strings.
## Be sure that SwiftGen only parses ONE locale (typically Base.lproj, or en.lproj, or whichever your development region is); otherwise it will generate the same keys multiple times.
## SwiftGen will parse all `.strings` files found in that folder.
strings:
inputs:
- i18n/en.lproj
outputs:
- templateName: structured-swift5
params:
bundle: Resources.bundle
publicAccess: true
output: Strings+Generated.swift
## Generate constants for your Assets Catalogs, including constants for images, colors, ARKit resources, etc.
## This example also shows how to provide additional parameters to your template to customize the output.
## - Especially the `forceProvidesNamespaces: true` param forces to create sub-namespace for each folder/group used in your Asset Catalogs, even the ones without "Provides Namespace". Without this param, SwiftGen only generates sub-namespaces for folders/groups which have the "Provides Namespace" box checked in the Inspector pane.
## - To know which params are supported for a template, use `swiftgen template doc xcassets swift5` to open the template documentation on GitHub.
xcassets:
inputs:
- Images.xcassets
- Colors.xcassets
outputs:
- templateName: swift5
params:
forceProvidesNamespaces: true
bundle: Resources.bundle
publicAccess: true
output: XCAssets+Generated.swift
## There are other parsers available for you to use depending on your needs, for example:
## - `fonts` (if you have custom ttf/ttc font files)
## - `coredata` (for CoreData models)
## - `json`, `yaml` and `plist` (to parse custom JSON/YAML/Plist files and generate code from their content)
## …
##
## For more info, use `swiftgen config doc` to open the full documentation on GitHub.
## https://github.com/SwiftGen/SwiftGen/tree/6.4.0/Documentation/