Skip to content

Commit

Permalink
readme entry
Browse files Browse the repository at this point in the history
  • Loading branch information
djbe committed Jan 28, 2017
1 parent f1d48a3 commit f8ecf4c
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,27 @@ This template subclass aims to remove those lines generated by using a simple wo
## Stencil.Extension & swiftStencilEnvironment

This framework also contains [helper methods for `Stencil.Extension` and `Stencil.Environment`](https://github.com/SwiftGen/StencilSwiftKit/blob/master/Sources/Environment.swift), to easily register all the tags and filters listed above on an existing `Stencil.Extension`, as well as to easily get a `Stencil.Environment` preconfigured with both those tags & filters `Extension` and the `StencilSwiftTemplate`.

## Parameters

This framework contains an additional parser, meant to parse a list of parameters from the CLI. For example, using [Commander](https://github.com/kylef/Commander), if you receive a `[String]` from a `VariadicOption<String>`, you can use the parser to convert it into a structured dictionary. For example:

```swift
["foo=1", "bar=2", "baz.qux=hello", "baz.items=a", "baz.items=b"]
```

will become

```swift
[
"foo": "1",
"bar": "2",
"baz": [
"qux": "hello",
"items": [
"a",
"b"
]
]
]
```

0 comments on commit f8ecf4c

Please sign in to comment.