Class: Sassic::Exec

Inherits:
Object
  • Object
show all
Defined in:
lib/sassic/exec.rb

Class Method Summary collapse

Class Method Details

.run!Object



2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# File 'lib/sassic/exec.rb', line 2

def self.run!
  target, options = parse_options!
  
  if target == 'build'
    # Build static output
    Sassic::Tasks.build(options)
  elsif target
    # Create new sassic site
    Sassic::Tasks.generate(target)
  else
    # Start server
    port = options[:port] && options[:port] > 0 ? options[:port] : 2000
    Sassic::Server.new(port).start
  end
end