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
).
- lucat1/helmet - A
react-helmet
like component - lucat1/css - A CSS styling library
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)
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"