JavaScript, with a little milk & sugar
Latte is an extension of JavaScript, bringing features of CoffeeScript in a familiar JS syntax.
If you like CoffeeScript, but not the Rubyish syntax, Latte is for you.
npm install -g latte
or
npm install --save-dev latte
$ latte --help
Latte.js compiler.
Usage: latte [options] [--] files...
Options:
-c, --compile Compile input files. If not specified, evaluates the files.
-o, --output Output directory, to be used with --compile.
--version Show version
$ latte
> [1,2,3].map(x => x * x)
[ 1, 4, 9 ]
latte -o lib/ -c src/
latte -o lib/ -c src/ -m
See the proper documentation at http://lattejs.com
- Arrow functions
- Generators
- Iterators
- Destructuring assignment
- Template strings
- Block-scoped variables ('let' statement)
- For-of statement
- Rest params
- Array spreads
- Monad syntax (similar to Haskell) for flattening async control flow
- Array comprehensions
- Declare variables in array comprehensions (more functional programming goodness)
- Filter with 'if' in for-of/for-in statements
- Registered .latte extension with Node.js, so .latte modules can be required (#15)
- Removed git:// dependencies
- Changed iterators & generators to reflect latest ES6 spec (no more StopIteration).
- Added benchmarks (just for generators, initially).
- Optimised generators for tail call emulation use case - performance is comparable to trampoline.
- Monads now implemented via generators - reusing control flow logic, and to allow use of native generators implementation where available (this will be a command line flag later on).
- Monads now properly support return statement (fixes #9).
- Added support for array spreads (via https://github.com/square/es6-spread).
- Added support for rest params (via https://github.com/thomasboyt/es6-rest-params).
- Added support for generating source maps (via https://github.com/benjamn/recast).
- Allow monad binds in for loops.
- Allow monad binds in test/update expressions in all supported control structures.
- Fixed break and continue in monad blocks.
- Fixed issue with monadic binds in a multiple-var-decl statement resulting in undefined references.
Fixed issue with using functions as part of a monad bind.
Various fixes.
- Support for monads.
- Initial support for ES6 generators.
- For-of statement.
Array comprehension improvement
Clear module cache when evaluating script in-process
- Array comprehension with variables
- Set __dirname properly when evaluating script in-process
- Array comprehensions
- Command line improvements
- For-in-if statement:
for (x in y if (x.is('awesome')))
- Array destructuring
- Let statement
- Support for more AST nodes (stops the noisy output)
Basic quasi-literals support
Node 0.8 compatibility
Grunt task
Unix fixes
Initial release, arrow functions