Skip to content
/ randr Public

Template rendering in golang inspired by react/lit-html/preact/htm

Notifications You must be signed in to change notification settings

lucat1/randr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Randr

Randr is a golang library to render HTML templates for server-side rendering, highly inspired by react, preact/htm and lit-element. It is still a proof-of-concept, but should perform way better compared to html/template because it compiles expressions to static code in golang, which means it also has 0 runtime overhead(similarly to quicktemplate).

Built with randr:

Installation

To install the compiler and the library it is suggested to use the standard go get command:

  $ go get -u github.com/lucat1/randr/rcc # get the compiler
  $ go get -u github.com/lucat1/randr # get the library (inside a project root)

Usage

NOTE: we assume that $GOPATH/bin is available inside your $PATH.

To compile a file or a folder of files you should use the rcc(randr code compiler) tool as follows:

  $ rcc <input> <output>

<input> can be either a file or a folder

<output> is the output location, and supports currenly only the [name] placeholder

Here's an example:

  $ rcc src "dist/[name].randr.go"

About

Template rendering in golang inspired by react/lit-html/preact/htm

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages