0.01
No commit activity in last 3 years
No release in over 3 years
Add LiveScript support to the Rails asset pipeline.
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
>= 4.2
~> 11.1

Runtime

~> 2.0
< 5.0, >= 3.0
 Project Readme

LiveScript-Rails

LiveScript adapter for the Rails asset pipeline.

Depends on Roonin-mx/livescript-ruby to compile LiveScript to javascript.

Source map is available if Sprockets >= 4.0.

Installation

Add the following lines to your Gemfile:

gem 'livescript-rails'

If you are precompiling your assets (with rake assets:precompile) before run your application in production, you might want add it to the assets group to prevent the gem being required in the production environment.

group :assets do
  gem 'livescript-rails'
end

Configuration

You can set compile options in config/initializers/assets.rb:

Rails.application.config.assets.livescript = {
  header: false,
}

See Roonin-mx/livescript-ruby for more options.

Default options:

  • bare: true (for backward compatibility)
  • header: true

filename and map options are set internally and not allowed to change.

License

MIT