https://github.com/mpclarkson/vapor-stencil
Stencil view renderer for Vapor
https://github.com/mpclarkson/vapor-stencil
Last synced: 6 months ago
JSON representation
Stencil view renderer for Vapor
- Host: GitHub
- URL: https://github.com/mpclarkson/vapor-stencil
- Owner: mpclarkson
- License: mit
- Created: 2016-02-14T22:51:30.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-02-14T22:52:53.000Z (over 9 years ago)
- Last Synced: 2024-10-14T07:23:25.445Z (8 months ago)
- Language: Swift
- Size: 1.95 KB
- Stars: 0
- Watchers: 2
- Forks: 8
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Vapor Stencil
Vapor `RenderDriver` implementation for [Stencil](https://github.com/kylef/Stencil).
## Installation
To add `VaporStencil`, add the following package to your `Package.swift`.
`Package.swift`
```swift
.Package(url: "https://github.com/tannernelson/vapor-stencil.git", majorVersion: 0)
```Then set the `StencilRenderer()` on your `View.renderers` for whatever file extensions you would like to be rendered as `Stencil` templates.
`main.swift`
```swift
import VaporStencil//set the stencil renderer
//for all .stencil files
View.renderers[".stencil"] = StencilRenderer()
```