module LiveScript::Source

Constants

VERSION

Public Class Methods

bundled_path() click to toggle source
# File lib/livescript/source.rb, line 5
def self.bundled_path
  raise 'livescript-source >= 1.4.0 only work with livescript-ruby >= 2.3.0!'
end
contents() click to toggle source

contents that expose LiveScript.compile

# File lib/livescript/source.rb, line 15
def self.contents
  filepath = File.expand_path('../livescript.js', __FILE__)
  # LiveScript >= 1.3 does not expose `LiveScript`
  File.read(filepath) + "var LiveScript = require('livescript');"
end
raw_contents() click to toggle source
# File lib/livescript/source.rb, line 9
def self.raw_contents
  filepath = File.expand_path('../livescript.js', __FILE__)
  File.read filepath
end