Project

livescript

0.0
No commit activity in last 3 years
No release in over 3 years
Ruby LiveScript is a bridge to the JS LiveScript compiler.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.11
~> 2.6
~> 5.8
~> 11.1

Runtime

 Project Readme

Ruby LiveScript

Ruby LiveScript compiler.

It uses execjs to run LiveScript javascript compiler.

Depends on livescript-source.

Installation

gem install livescript

If you are using Bundler, add the following to your Gemfile:

gem 'livescript'

Usage

require 'livescript'

options = {bare: true, header: false}

result = LiveScript.compile(source_code, options)

# get default options
options = LiveScript.default_options

# set default options
LiveScript.default_options = options

Available options:

  • bare: Default true. If true, compile without the top-level function wrapper
  • header: Default true. If true, add the "Generated by" header
  • const: Default false. If true, compile all variables as constants
  • filename: An optional filename used for compilation errors
  • map: Source map type

See Programmatic API section at livescript.net for more.

License

MIT