Class: Middleman::Cli::Sync

Inherits:
Thor
  • Object
show all
Includes:
Thor::Actions
Defined in:
lib/middleman-sync/commands.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.exit_on_failure?Boolean

Returns:

  • (Boolean)


15
16
17
# File 'lib/middleman-sync/commands.rb', line 15

def self.exit_on_failure?
  true
end

Instance Method Details

#syncObject



20
21
22
23
24
25
26
27
28
29
30
31
# File 'lib/middleman-sync/commands.rb', line 20

def sync

  shared_inst = ::Middleman::Application.server.inst

  enabled = shared_inst.options.enabled
  if (!enabled)
    raise Thor::Error.new "You need to activate the sync extension in config.rb"
  end

  ::AssetSync.sync

end