GitHub - js-scala/forest: HTML fragments definition DSL | Latest TMZ Celebrity News & Gossip | Watch TMZ Live
Skip to content

js-scala/forest

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 

Repository files navigation

Forest: DSL for defining HTML fragments

Forest is a DSL to define how to represent data in HTML. It can produce JavaScript or Scala computations, thus allowing to render HTML fragments on client side or on server side.

Example of HTML template using forest:

def profile(user: Rep[User]) =
  el('dl)(
    el('dt)("Name"),
    el('dd)(user.name),
    el('dt)("Age"),
    el('dd)(user.age)
  )

Rendering this template will produce a DOM fragment equivalent to the following markup:

<dl>
  <dt>Name</dt>
  <dd>Julien</dd>
  <dt>Age</dt>
  <dd>27</dd>
</dl>

See the tests for more examples.

Setup

First, setup js-scala.

Then, you can build the forest DSL:

Go under the forest/ subdirectory and run sbt. You can check the tests, or publish-local.

You may also be interested in the external DSL layer:

Go under the compiler/ subdirectory and run sbt publish-local.

About

HTML fragments definition DSL

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages

TMZ Celebrity News – Breaking Stories, Videos & Gossip

Looking for the latest TMZ celebrity news? You've come to the right place. From shocking Hollywood scandals to exclusive videos, TMZ delivers it all in real time.

Whether it’s a red carpet slip-up, a viral paparazzi moment, or a legal drama involving your favorite stars, TMZ news is always first to break the story. Stay in the loop with daily updates, insider tips, and jaw-dropping photos.

🎥 Watch TMZ Live

TMZ Live brings you daily celebrity news and interviews straight from the TMZ newsroom. Don’t miss a beat—watch now and see what’s trending in Hollywood.