Class: EasyHtmlGenerator::Generator::Minimize::Css
- Inherits:
-
Compile::Base
- Object
- Base
- Compile::Base
- EasyHtmlGenerator::Generator::Minimize::Css
- Defined in:
- lib/easy_html_generator/generator/minimize/css.rb
Overview
this generator minifies css files from src folder and copies them to the dist folder
Instance Attribute Summary
Attributes inherited from Base
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from Compile::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
Class Method Details
.compress(input) ⇒ Object
18 19 20 |
# File 'lib/easy_html_generator/generator/minimize/css.rb', line 18 def self.compress(input) CSSminify.compress input end |
Instance Method Details
#do_input!(input, *_args) ⇒ Object
10 11 12 |
# File 'lib/easy_html_generator/generator/minimize/css.rb', line 10 def do_input!(input, *_args) self.class.compress input end |
#input_to_output_file(input_file, config) ⇒ Object
14 15 16 |
# File 'lib/easy_html_generator/generator/minimize/css.rb', line 14 def input_to_output_file(input_file, config) super(input_file, config).gsub(/\.css$/, "#{config.prefix_extension}.css") end |