Module: Jzip::Engine::Support::Minifier
- Extended by:
- Minifier
- Includes:
- Notifier
- Included in:
- Minifier
- Defined in:
- lib/jzip/engine/support/minifier.rb
Instance Method Summary collapse
Methods included from Notifier
Instance Method Details
#parse(source_file) ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/jzip/engine/support/minifier.rb', line 10 def parse(source_file) target_file = derive_target(source_file) unless File.exists?(target_file) notify "Minifying '#{source_file}'" FileUtils.mkdir_p File.dirname(target_file) `ruby #{File.join(File.dirname(__FILE__), "jsmin.rb")} <#{source_file} >#{target_file}` end target_file end |