class Bolt::Build
Public Instance Methods
copy_resources()
click to toggle source
Copies the contents of $config.resources to the out directory
# File lib/bolt/build.rb, line 27 def copy_resources FileUtils.cp_r(Dir.glob("#{d($config.resources)}/*"), $config.out) puts "Copied #{d($config.resources)} to #{$config.out}" end
load_pages()
click to toggle source
# File lib/bolt/build.rb, line 38 def load_pages pages = Dir.glob("#{d($config.pages)}/*.rb") pages.each do |page| parse_page page end end
parse_config()
click to toggle source
Parses $config.config and loads all contents into instance variables
# File lib/bolt/build.rb, line 33 def parse_config $config_file = YAML::load(open_file(d($config.config))) puts "Parsed config #{d($config.config)}" end
parse_page(page)
click to toggle source
# File lib/bolt/build.rb, line 45 def parse_page(page) puts "Parsing page #{page}" load page end
run()
click to toggle source
# File lib/bolt/build.rb, line 18 def run remove_directory($config.out) create_directory($config.out, :error_if_exists => false) copy_resources parse_config load_pages end