Module: LiveScript::Source
- Defined in:
- lib/livescript/source.rb,
lib/livescript/source/version.rb
Constant Summary collapse
- VERSION =
'1.5.0'
Class Method Summary collapse
- .bundled_path ⇒ Object
-
.contents ⇒ Object
contents that expose LiveScript.compile.
- .raw_contents ⇒ Object
Class Method Details
.bundled_path ⇒ Object
5 6 7 |
# 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 ⇒ Object
contents that expose LiveScript.compile
15 16 17 18 19 |
# File 'lib/livescript/source.rb', line 15 def self.contents filepath = File.('../livescript.js', __FILE__) # LiveScript >= 1.3 does not expose `LiveScript` File.read(filepath) + "var LiveScript = require('livescript');" end |
.raw_contents ⇒ Object
9 10 11 12 |
# File 'lib/livescript/source.rb', line 9 def self.raw_contents filepath = File.('../livescript.js', __FILE__) File.read filepath end |