Chamomile: A JavaScript superset.
This package implements a compiler that translates Chamomile into JavaScript. Chamomile is a superset of JavaScript (all valid JavaScript is also valid Chamomile).
It is a fork of http://github.com/mishoo/UglifyJS/ so provides the same minifying/beautifying features of that project. It is also distributed under the BSD license.
Shortcuts added:
Short functions
Chamomile:
var f = -> return 1
JavaScript:
var { return 1 }
Short functions that preserve this
Chamomile:
var { return this }
JavaScript:
var f = { this }
Accessing members of this
Chamomile:
@member = 420;@
JavaScript:
thismember = 420;thismethod'argument!'
Installation
% npm install -g chamomile
Usage
% chamomile source.chmo > output.js% chamomile -o output.js source.chmo% chamomile --help