bbmustache
Gleam绑定到模板库。
import gleam / bbmustache.{string}
import gleam / expect
pub fn main () {
let Ok (template) = bbmustache. compile ( "Hello, {{name}}!" )
let rendered = bbmustache. render (template, [
string ( "name" , "World" ),
])
expect. equal (rendered, "Hello, World!" )
}
快速开始
# Build the project
rebar3 compile
# Run the eunit tests
rebar3 eunit
# Run the Erlang REPL
reba
评论0
最新资源