class Bootswatch::Generators::ImportGenerator
Public Instance Methods
import_less()
click to toggle source
# File lib/generators/bootswatch/import/import_generator.rb, line 23 def import_less stylesheets_dest_path = "app/assets/stylesheets/#{theme_directory}" empty_directory stylesheets_dest_path get File.join(theme_repo_url,'variables.less'), File.join(stylesheets_dest_path,'variables.less') get File.join(theme_repo_url,'bootswatch.less'), File.join(stylesheets_dest_path,'bootswatch.css.less') prepend_to_file File.join(stylesheets_dest_path,'bootswatch.css.less') do "@import \"#{theme_directory}/base\";\n\n" end gsub_file File.join(stylesheets_dest_path, 'variables.less'), '"../fonts/"', '"twitter/bootstrap/"' end
theme_directory()
click to toggle source
# File lib/generators/bootswatch/import/import_generator.rb, line 11 def theme_directory if class_path.empty? theme_name else class_path.first end end
theme_name()
click to toggle source
# File lib/generators/bootswatch/import/import_generator.rb, line 7 def theme_name file_name end
theme_repo_url()
click to toggle source
# File lib/generators/bootswatch/import/import_generator.rb, line 19 def theme_repo_url "https://raw.github.com/thomaspark/bootswatch/gh-pages/#{theme_name}" end