Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

justin-ml

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

justin-ml

Compiler for a simple templating language

  • 0.1.2
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

justin-ml

Just another templating language

Usage

Installation

From npm: npm i -g justin-ml

From local copy: npm i -g ., or run with the npm start script

Compiling

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

Language

Syntax

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" }

Features

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")
}

Todo

  • Way to import other files
  • Control flow keywords

FAQs

Package last updated on 13 Nov 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc