Class: Massimo::CLI

Inherits:
Thor
  • Object
show all
Includes:
Thor::Actions
Defined in:
lib/massimo/cli.rb

Instance Method Summary collapse

Instance Method Details

#buildObject



19
20
21
22
23
24
# File 'lib/massimo/cli.rb', line 19

def build
  Kernel.exit Massimo::UI.report_errors {
    site.process
    Massimo::UI.say 'massimo has built your site', :growl => true
  }
end

#new(site_name) ⇒ Object



28
29
30
# File 'lib/massimo/cli.rb', line 28

def new(site_name)
  directory 'site', site_name
end

#server(port = 3000) ⇒ Object



34
35
36
# File 'lib/massimo/cli.rb', line 34

def server(port = 3000)
  Massimo::Server.start(site, port.to_i)
end

#versionObject



46
47
48
# File 'lib/massimo/cli.rb', line 46

def version
  puts Massimo::VERSION
end

#watchObject



40
41
42
# File 'lib/massimo/cli.rb', line 40

def watch
  Massimo::Watcher.start(site)
end