Olivier Halligon e93b33423b Release 0.14.0 (#300)
* Introduce script to automate release

* Rakefile levelup

* Version 0.14.0

* Fix newline at end of podspec.json

* Ensure we start and end on master branch

And that we pull latest master before tagging

* CRLF at EOF

* Remove [:version] param from `release:finish` task

It can be guessed from the current podspec version

* Fix create_release task

* Ensure we run rake via bundle exec

Co-authored-by: David Jennes <djbe@users.noreply.github.com>

Co-authored-by: David Jennes <djbe@users.noreply.github.com>
2020-08-17 20:42:00 +02:00
2020-08-17 20:42:00 +02:00
2020-08-17 20:42:00 +02:00
2020-08-12 22:52:00 +02:00
2020-08-12 22:52:00 +02:00
2020-08-12 22:52:00 +02:00
2020-08-12 22:52:00 +02:00
2020-08-17 20:42:00 +02:00
2020-08-17 20:42:00 +02:00
2020-08-17 20:42:00 +02:00
2018-09-26 00:38:40 +02:00
2019-04-05 14:26:02 +09:00
2020-08-12 21:13:45 +02:00
2020-08-17 20:42:00 +02:00
2019-02-17 14:58:36 +01:00
2020-08-17 20:42:00 +02:00

Stencil

Build Status

Stencil is a simple and powerful template language for Swift. It provides a syntax similar to Django and Mustache. If you're familiar with these, you will feel right at home with Stencil.

Example

There are {{ articles.count }} articles.

<ul>
  {% for article in articles %}
    <li>{{ article.title }} by {{ article.author }}</li>
  {% endfor %}
</ul>
import Stencil

struct Article {
  let title: String
  let author: String
}

let context = [
  "articles": [
    Article(title: "Migrating from OCUnit to XCTest", author: "Kyle Fuller"),
    Article(title: "Memory Management with ARC", author: "Kyle Fuller"),
  ]
]

let environment = Environment(loader: FileSystemLoader(paths: ["templates/"]))
let rendered = try environment.renderTemplate(name: "article_list.html", context: context)

print(rendered)

Philosophy

Stencil follows the same philosophy of Django:

If you have a background in programming, or if youre used to languages which mix programming code directly into HTML, youll want to bear in mind that the Django template system is not simply Python embedded into HTML. This is by design: the template system is meant to express presentation, not program logic.

The User Guide

Resources for Stencil template authors to write Stencil templates:

Resources to help you integrate Stencil into a Swift project:

Projects that use Stencil

Sourcery, SwiftGen, Kitura, Weaver, Genesis

License

Stencil is licensed under the BSD license. See LICENSE for more info.

Description
A simple and powerful template language for Swift.
Readme 993 KiB
Languages
Swift 74.6%
HTML 16.6%
Ruby 8.5%
Shell 0.3%