Skip to content

lightscript/lightscript

Repository files navigation

LightScript

A close superset of ES7 with JSX and Flow, built with Babel. Designed to make programmers a little more productive.

See lightscript.org for example code and language reference documentation. A quick taste:

Item({ item, isActive }) =>
  className = if isActive: 'active' else: 'inactive'

  <li className={className}>
    {item}
  </li>

Come hang out in the gitter chatroom, where contributors can help you get started and answer any questions.

Language Features

In addition to all all ES7, JSX, and Flow features:

  • (Optional) Significant Indentation
  • Implicit Returns
  • If Expressions
  • Auto const
  • Async/Await shorthand
  • Safe-Await
  • Readable Operators (or, and, ==, etc)
  • Bound Methods
  • Commaless Objects and Arrays
  • Automatic Semicolon Insertion that always works
  • Array Comprehensions
  • Object Comprehensions
  • Array-based for-loops
  • Object-based for-loops
  • a few others

Reference documentation is available at lightscript.org, or in Markdown format here. Tests for all features can be seen here and here.

Project Structure

"LightScript" is split across multiple repos:

For now, the issue tracker on this repo should be used for bug reports and feature requests.