Giter Site home page Giter Site logo

tsipinio / beard Goto Github PK

View Code? Open in Web Editor NEW

This project forked from zalando/beard

0.0 2.0 0.0 448 KB

A lightweight, logicless templating engine, written in Scala and inspired by Mustache

License: Other

Scala 89.95% ANTLR 3.97% FreeMarker 1.40% HTML 4.68%

beard's Introduction

Beard: A Blazing-Fast Template Engine

Build Status

Beard is a logic-less templating engine written in Scala and inspired by Mustache. You can use it out-of-the-box; see the Requirements list below.

What makes Beard powerful:

  • Streaming. As soon as you need to render something, you can stream it to the browser. This provides high user-perceived performance.
  • Speed. We've benchmarked it against other template engines for the JVM, and Beard performed much faster in terms of rendering time. (We invite you to run your own benchmarks to see if you get the same results.) It also uses ANTLR to make template compilation fast.
  • It offers template inheritance.
  • Its simple, beautiful syntax. A la Mustache, it uses only the { and } markers for tags and delimiters.

Here's a code snippet to show you how simply Beard can parse templates:

<html>
  <head>
	<title>{{ the.title }}</title>
  </head>
  <body>
	{{ the.content }}
  </body>
</html>

Requirements

  • Scala 2.11 or 2.12
  • a package manager like sbt or Maven

Installing

If you're using sbt, add this line to your build.sbt file:

libraryDependencies += "de.zalando" %% "beard" % "0.2.0"

resolvers ++= Seq(
  "zalando-maven" at "https://dl.bintray.com/zalando/maven"
)

If you're using Maven, run this:

<repositories>
    <repository>
        <snapshots>
            <enabled>false</enabled>
        </snapshots>
        <id>bintray-maven</id>
        <name>bintray</name>
        <url>https://dl.bintray.com/zalando/maven</url>
    </repository>
</repositories>

<dependency>
    <groupId>de.zalando</groupId>
    <artifactId>beard_2.12</artifactId>
    <version>0.2.0</version>
</dependency>

Binaries are available from bintray

Additional Documentation

We've started a Gitbook for additional docs. There, you'll find more information on:

You can contribute to this documentation here.

Contributing/TODO List

We gladly welcome contributions—just submit a pull request with a short note summarizing briefly (1-2 sentences) what you've done. If you'd like to make a substantial contribution to Beard, we could use your help with these items:

  • adding filters: ind Handlebars, Angular, Twig, etc.
  • providing more meaningful error messages

License

Copyright 2015 Zalando SE

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

beard's People

Contributors

andreyfurdylo avatar boopathi avatar cesarla avatar danpersa avatar endeneu avatar fokusferit avatar igneus avatar jmhofer avatar kaygorodov avatar lappleapple avatar michaelkrog avatar mo-gr avatar rweyand avatar slavaschmidt avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.