class BourbonIntegrator::Command::Init
Public Instance Methods
generate_bitters_dir()
click to toggle source
# File lib/bourbon_integrator/command/init.rb, line 44 def generate_bitters_dir @output.puts "*** Initialize bitters ***" @executor.system "bitters install --path #{sass_path}" end
generate_bourbon_dir()
click to toggle source
# File lib/bourbon_integrator/command/init.rb, line 34 def generate_bourbon_dir @output.puts "*** Initialize bourbon ***" @executor.system "bourbon install --path #{sass_path}" end
generate_neat_dir()
click to toggle source
# File lib/bourbon_integrator/command/init.rb, line 39 def generate_neat_dir @output.puts "*** Initialize neat ***" @executor.system "cd #{sass_path} && neat install" end
generate_struct_vars()
click to toggle source
# File lib/bourbon_integrator/command/init.rb, line 49 def generate_struct_vars return if File.exist?(vars_file_path) @output.puts "*** Creating _struct_vars file ***" FileUtils.mkdir_p sass_path File.open(vars_file_path, "w") do |f| f.write render_vars_file end end
run()
click to toggle source
# File lib/bourbon_integrator/command/init.rb, line 27 def run generate_bourbon_dir generate_neat_dir generate_bitters_dir generate_struct_vars end
Private Instance Methods
http_base_path()
click to toggle source
# File lib/bourbon_integrator/command/init.rb, line 90 def http_base_path File.join( @config.fetch("project_cdn_url").to_s, @config.fetch("project_assets_http_path") ) end
http_fonts_path()
click to toggle source
# File lib/bourbon_integrator/command/init.rb, line 83 def http_fonts_path File.join( http_base_path, @config.fetch("project_font_dir") ) end
http_images_path()
click to toggle source
# File lib/bourbon_integrator/command/init.rb, line 76 def http_images_path File.join( http_base_path, @config.fetch("project_images_dir") ) end
http_stylesheets_path()
click to toggle source
# File lib/bourbon_integrator/command/init.rb, line 69 def http_stylesheets_path File.join( http_base_path, @config.fetch("project_css_dir") ) end
render_vars_file()
click to toggle source
# File lib/bourbon_integrator/command/init.rb, line 60 def render_vars_file ::Mustache.render( IO.read(default_vars_file_path), http_stylesheets_path: http_stylesheets_path, http_images_path: http_images_path, http_fonts_path: http_fonts_path ) end