Sha256: 93abb97d8b55c3ce246fd29d1e68f44f741dc33e60ed7bd3506242264dede2d2
Contents?: true
Size: 949 Bytes
Versions: 12
Compression:
Stored size: 949 Bytes
Contents
JQTOUCH_MESSAGE1 = "# Generated by compass-jquery-plugin/gem-tasks/jqtouch.rake\n# Install with: compass install jquery/jqtouch\n\n" JQTOUCH_MESSAGE2 = "// Generated by compass-jquery-plugin/gem-tasks/jqtouch.rake\n\n" class JqTouchTheme # Initialize with the base theme def initialize @theme_filename = "theme.css" end # Create a sass file of variables names and copy the images def convert_theme(name, dir, stylesheets) theme = File.read(File.join(dir, @theme_filename)) # Fix stuff theme.gsub!(/\;filter:Alpha/, "; filter: Alpha") theme.gsub! /url\(img(.+?)\)/, "image_url(\"jquery/touch/#{name}\\1\")" # Convert the stylesheet open File.join(JQTOUCH_DEST_THEMES, "#{name}.scss"), 'w' do |f| sass = JQTOUCH_MESSAGE2 IO.popen("sass-convert -F css -T scss", 'r+') { |ff| ff.print(theme); ff.close_write; sass += ff.read } f.print sass end end end
Version data entries
12 entries across 12 versions & 1 rubygems