class Svgeez::Commands::Watch
Public Class Methods
process(options)
click to toggle source
# File lib/svgeez/commands/watch.rb, line 5 def process(options) builder = Svgeez::Builder.new(options) folder_path = builder.source.folder_path Svgeez.logger.info "Watching `#{folder_path}` for changes... Press ctrl-c to stop." Listen.to(folder_path, only: /\.svg\z/) { builder.build }.start sleep rescue Interrupt Svgeez.logger.info 'Quitting svgeez...' end
Private Class Methods
command_action(options)
click to toggle source
# File lib/svgeez/commands/watch.rb, line 19 def command_action(options) Build.process(options) Watch.process(options) end
command_description()
click to toggle source
# File lib/svgeez/commands/watch.rb, line 24 def command_description 'Watches a folder of SVG icons for changes' end
command_syntax()
click to toggle source
# File lib/svgeez/commands/watch.rb, line 28 def command_syntax 'watch [options]' end