Class: Traceur::Configuration
- Inherits:
-
Object
- Object
- Traceur::Configuration
- Defined in:
- lib/traceur/configuration.rb
Instance Attribute Summary collapse
- #compile_script_path ⇒ Object
- #node_binary ⇒ Object
- #node_modules_path ⇒ Object
- #traceur_runtime_path ⇒ Object
Instance Method Summary collapse
- #assets_path ⇒ Object
- #default_compilation_options ⇒ Object
- #default_compilation_options=(hash) ⇒ Object
Instance Attribute Details
#compile_script_path ⇒ Object
26 27 28 |
# File 'lib/traceur/configuration.rb', line 26 def compile_script_path @compile_script_path ||= root_dir.join("lib", "js", "compile.js") end |
#node_binary ⇒ Object
10 11 12 |
# File 'lib/traceur/configuration.rb', line 10 def node_binary @node_binary ||= "node" end |
#node_modules_path ⇒ Object
14 15 16 |
# File 'lib/traceur/configuration.rb', line 14 def node_modules_path @node_modules_path ||= root_dir.join("node_modules") end |
#traceur_runtime_path ⇒ Object
18 19 20 |
# File 'lib/traceur/configuration.rb', line 18 def traceur_runtime_path @traceur_runtime_path ||= node_modules_path.join("traceur", "bin", "traceur-runtime.js") end |
Instance Method Details
#assets_path ⇒ Object
22 23 24 |
# File 'lib/traceur/configuration.rb', line 22 def assets_path traceur_runtime_path.dirname.to_s end |
#default_compilation_options ⇒ Object
30 31 32 33 34 35 |
# File 'lib/traceur/configuration.rb', line 30 def ||= CompilationOptions.new( modules: :inline, source_maps: :inline, ) end |
#default_compilation_options=(hash) ⇒ Object
37 38 39 |
# File 'lib/traceur/configuration.rb', line 37 def (hash) = CompilationOptions.new(hash) end |