|
| 1 | +## SwiftGenKit 2.0 (SwiftGen 5.0) |
| 2 | + |
| 3 | +### For template writers: |
| 4 | + |
| 5 | +#### Colors |
| 6 | + |
| 7 | +- `enumName`: has been replaced by `param.enumName`, should provide default value. |
| 8 | +- For each `color`: |
| 9 | + - `rgb` and `rgba`: can be composed from the other components. |
| 10 | + |
| 11 | +#### Fonts |
| 12 | + |
| 13 | +- `enumName`: has been replaced by `param.enumName`, should provide default value. |
| 14 | +- For each `font`: |
| 15 | + - `fontName`: has been replaced by the `name` property. |
| 16 | + |
| 17 | +#### Images |
| 18 | + |
| 19 | +- `enumName`: has been replaced by `param.enumName`, should provide default value. |
| 20 | +- `images`: just old, `catalogs` contains the structured information. |
| 21 | + |
| 22 | +#### Storyboards |
| 23 | + |
| 24 | +- `extraImports`: replaced by `modules` (https://github.com/AliSoftware/SwiftGen/pull/243) |
| 25 | +- `sceneEnumName`: has been replaced by `param.sceneEnumName`, should provide default value. |
| 26 | +- `segueEnumName`: has been replaced by `param.segueEnumName`, should provide default value. |
| 27 | +- For each `scene`: |
| 28 | + - `isBaseViewController`: removed. You can replace it with a test for `baseType == "ViewController"`. |
| 29 | + |
| 30 | +#### Strings |
| 31 | + |
| 32 | +- `enumName`: has been replaced by `param.enumName`, should provide default value. |
| 33 | +- `strings` and `structuredStrings`: replaced by `tables` array, where each table has a structured `levels` property. |
| 34 | +- `tableName`: replaced by `tables` array, where each table has a `name` property. |
| 35 | +- for each `level`: |
| 36 | + - `subenums`: renamed to `children`. |
| 37 | +- for each `string`: |
| 38 | + - `keytail`: renamed to `name`. |
| 39 | + - `params` structure with the `names`, `typednames`, `types`, `count` and `declarations` arrays: removed. |
| 40 | + - These have been replaced by `types` which is an array of types. The previous variables |
| 41 | + can now be reconstructed using template tags now that Stencil has become more powerful. |
| 42 | + |
| 43 | +### For developers using SwiftGenKit as a dependency: |
| 44 | + |
| 45 | +Previously the parser context generation method (`stencilContext()`) accepted parameters such as `enumName`, this has been removed in favor of the `--param` system. Templates will automatically receive a `param` object with parameters from the CLI invocation, and should provide default values in case no value was present in the invocation. |
0 commit comments