lit-html-macro

Crates.iolit-html-macro
lib.rslit-html-macro
version0.0.1
sourcesrc
created_at2020-11-07 06:51:50.54598
updated_at2020-11-07 16:58:06.167759
descriptionA macro for using lit-html
homepage
repositoryhttps://github.com/richardanaya/lit-html-rs
max_upload_size
id309569
size4,504
richardanaya2_2048b.Q6_K.gguf (richardanaya)

documentation

README

lit-html-rs

A Rust library for using the HTML template library lit-html.

use lit_html::*;

#[template("<div>Hello ${name}</div>")]
pub struct HelloWorldTemplate {
    pub name: String,
}

#[no_mangle]
pub fn main() {
    let template = HelloWorldTemplate {
        name: "Richard".to_string(),
    };
    render(template.execute(), js::DOM_BODY);
}
Commit count: 49

cargo fmt