-
Notifications
You must be signed in to change notification settings - Fork 11
/
swiftgen.yml
50 lines (48 loc) · 2.69 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
46
47
48
49
50
## Note: all of the config entries below are just examples with placeholders. Be sure to edit and adjust to your needs when uncommenting.
## 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: Sources/eRpApp/Resources/en-GB.lproj
outputs:
- templatePath: Templates/strings.stencil
output: Sources/eRpApp/Generated/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: Sources/eRpApp/Resources/Assets.xcassets
outputs:
- templatePath: Templates/xcassets.stencil
params:
forceProvidesNamespaces: true
bundle: Bundle.module
output: Sources/eRpApp/Generated/XCAssets+Generated.swift
- inputs: Tests/eRpAppTests/Resources/Assets.xcassets
outputs:
- templatePath: Templates/xcassets.stencil
params:
forceProvidesNamespaces: true
output: Tests/eRpAppTests/Mocks/Generated/XCAssets+Generated.swift
- inputs: Sources/eRpStyleKit/Resources/Assets.xcassets
outputs:
- templatePath: Templates/xcassets.stencil
params:
forceProvidesNamespaces: true
bundle: Bundle.module
output: Sources/eRpStyleKit/Generated/XCAssets+Generated.swift
## Generate Accessibility Identifiers from reference file
yaml:
- inputs: Sources/eRpApp/Resources/AccessibilityIdentifier.yaml
outputs:
- templatePath: Templates/accessibility.stencil
params:
enumName: "A11y"
output: Sources/eRpApp/Generated/Accessibility+Generated.swift
- inputs: Sources/eRpApp/Resources/AnalyticsIdentifier.yaml
outputs:
- templatePath: Templates/analytics.stencil
params:
enumName: "Analytics"
output: Sources/eRpApp/Generated/Analytics+Generated.swift