Class: EasyHtmlGenerator::Generator::Compile::Coffee
- Defined in:
- lib/easy_html_generator/generator/compile/coffee.rb
Overview
this generator coffee sass files from src folder and copies them to the dist folder
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
- #do_input!(input, input_file = 'inline', *_args) ⇒ Object
- #input_to_output_file(input_file, config) ⇒ Object
Methods inherited from Base
#do_file, #generate!, #walk_files, #watch_files
Methods inherited from Base
#enabled?, #file_changed?, #generate, #generate!, #initialize, #log, #log_running, #repetitive?, #store_file_hash, #tasks
Constructor Details
This class inherits a constructor from EasyHtmlGenerator::Generator::Base
Instance Method Details
#do_input!(input, input_file = 'inline', *_args) ⇒ Object
10 11 12 13 14 15 16 17 18 |
# File 'lib/easy_html_generator/generator/compile/coffee.rb', line 10 def do_input!(input, input_file = 'inline', *_args) result = CoffeeScript.compile input return result unless @config.minimize EasyHtmlGenerator::Generator::Minimize::Js.compress result rescue StandardError => e raise e, "#{e.} in #{input_file} ", e.backtrace end |
#input_to_output_file(input_file, config) ⇒ Object
20 21 22 |
# File 'lib/easy_html_generator/generator/compile/coffee.rb', line 20 def input_to_output_file(input_file, config) super(input_file, config).gsub('.js.coffee', '.js') end |