Class: Sassic::Builder

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

Instance Method Summary collapse

Constructor Details

#initialize(server, options = {}) ⇒ Builder

Returns a new instance of Builder.



5
6
7
8
9
10
# File 'lib/sassic/builder.rb', line 5

def initialize(server, options={})
  @server = server
  @relative = options[:relative]
  @output = options[:output] || 'output'
  @stylesheets = []
end

Instance Method Details

#run!Object



12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# File 'lib/sassic/builder.rb', line 12

def run!
  puts "Creating output directory..."
  create_output_directory
  
  # Static pages must be generated before stylesheets
  puts "Generating pages..."
  generate_static_pages
  
  puts "Generating stylesheets..."
  generate_stylesheets
  
  puts "Copying images..."
  copy_images
  
  puts "Copying javascripts..."
  copy_javascripts
  
  if @relative
    puts "Relativizing paths..."
    relativize_paths
  end
  
  puts "Build completed."
end