scraps

A Space based HTML template language.

npm install scraps
50 downloads in the last week
102 downloads in the last month

Scraps

Scraps is a Space based HTML template language.

Scraps is currently in beta and the API is still changing.

Try it now

Try it now at http://scraps.nudgepad.com

Examples

Basic Example

A normal html div written in Scraps looks like this:

div
 content Hello world
 style
  left 10px
  top 10px

This would get turned into html that looks like this:

<div style="left: 10px; top: 10px">Hello world</div>

HTML Types

Scraps can be any html element:

textarea
 placeholder Enter some text
 style
  left 10px
  top 40px

HTML attributes

Scraps can use all normal html attributes such as "name" or "value":

input
 type text
 name age
 placeholder Age
 value 18
 style
  left 10px
  top 40px

Recursion

ul
 li
  content One
 li
  content Two

DOM Events

divs
 content Hello world
 onclick alert('Hello world'!)

Build Status

Build Status

npm loves you