Categorygithub.com/lucat1/randr
repositorypackage
0.0.8
Repository: https://github.com/lucat1/randr.git
Documentation: pkg.go.dev

# Packages

No description provided by the author
No description provided by the author

# README

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

To compile a file or a folder of files you should use the rcc(randr code compiler) tool as follows: (supposing $GOPATH/bin is available inside your $PATH)

  $ 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"