Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
Elviro Rocca committed Apr 6, 2018
1 parent b1961e8 commit 10890c7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,12 @@ The templates include:
- add with `// sourcery: match`;
- [Lens.stencil](Lens.stencil): autogeneration of "lenses" for structs, based on the implementation proposed in [FunctionalKit](https://github.com/facile-it/FunctionalKit) (please refer to [this article](https://broomburgo.github.io/fun-ios/post/lenses-and-prisms-in-swift-a-pragmatic-approach/) for more info);
- add with `// sourcery: lens`;
- add `chain` option for automatic chaining of lenses: with `// sourcery: lens = "chain"` you'll be able to compose lenses with `TypeName.lens.prop1.prop2.prop3`;
- [Prism.stencil](Prism.stencil): autogeneration of "prisms" for enums, based on the implementation proposed in [FunctionalKit](https://github.com/facile-it/FunctionalKit) (please refer to [this article](https://broomburgo.github.io/fun-ios/post/lenses-and-prisms-in-swift-a-pragmatic-approach/) for more info)
- add with `// sourcery: prism`;
- add `chain` option for automatic chaining of prisms: with `// sourcery: prism = "chain"` you'll be able to compose prisms with `TypeName.prism.case1.case2.case3`;

Please note that lens and prism chaining **only works** with *non-nested* types, e.g. it won't work for types like `TypeName.NestedType`, due to a limitation with Sourcery.

------

Expand Down

0 comments on commit 10890c7

Please sign in to comment.