Just another templating language
From npm: npm i -g justin-ml
From local copy: npm i -g .
, or run with the npm start
script
Options
-V, --version
Installed version-i, --input
Input file (optional, can use file arg instead)-o, --output
Output file (optional, default writes to stdout)--pretty
Format outputted html
$ justin-ml compile_this.jml
Brackets instead of closing tags
div {
span { }
}
Attributes use : instead of =
a href:"google.com" { }
Text represented as strings
span { "some text" }
JS style comments
// This will be ignored
span { "hello" }
Variables
def $primary "blue"
def $link "google.com"
a href:$link color:$primary {
"go to " $link
}
Templates
tmpl $button ($color $action) {
button color:$color {
"clicking here will " $action
}
}
div class:"shopping-cart-footer" {
$button ("grey" "cancel your order")
$button ("green" "continue to checkout")
}
- Way to import other files
- Control flow keywords