Sha256: 2691189cfef7e3173a51ef9b3c03e00dc74a6d90d0a41bd7250900d4ff4e50fa

Contents?: true

Size: 1.18 KB

Versions: 18

Compression:

Stored size: 1.18 KB

Contents

module Sprout # :nodoc:
  
  # The MXMLCStylesheet helper simplifies the creation of
  # runtime CSS stylesheet SWFs for Flex applications.
  # This task can work using either a Singleton or 
  # provided ProjectModel instance
  #
  # The simple case that uses a Singleton ProjectModel:
  #   stylesheet :skin
  #
  # Using a ProjectModel instance:
  #   project_model :model
  #
  #   stylesheet :skin => :model
  #
  # Configuring the proxy MXMLCTask
  #   stylesheet :skin do |t|
  #     t.link_report = 'LinkReport.rpt'
  #   end
  #
  class MXMLCStyleSheet < MXMLCHelper
  
    def initialize(args, &block)
      super
      outer = define_outer_task
      
      mxmlc output do |t|
        configure_mxmlc t
        yield t if block_given?
      end
      
      outer.prerequisites << output
      return output
    end
    
    protected
    
    def create_input
      return File.join(@model.src_dir, @model.project_name + 'Skin') + input_extension
    end
    
    def create_output
      return "#{create_output_base}Skin.swf"
    end

    def input_extension
      return '.css'
    end
    
    
  end
end

def stylesheet(args, &block)
    return Sprout::MXMLCStyleSheet.new(args, &block)
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
sprout-as3-bundle-1.0.37 lib/sprout/tasks/mxmlc_stylesheet.rb
sprout-as3-bundle-1.0.36 lib/sprout/tasks/mxmlc_stylesheet.rb
sprout-as3-bundle-1.0.32 lib/sprout/tasks/mxmlc_stylesheet.rb
sprout-as3-bundle-1.0.31 lib/sprout/tasks/mxmlc_stylesheet.rb
sprout-as3-bundle-1.0.29 lib/sprout/tasks/mxmlc_stylesheet.rb
sprout-as3-bundle-1.0.30 lib/sprout/tasks/mxmlc_stylesheet.rb
sprout-as3-bundle-1.0.11 lib/sprout/tasks/mxmlc_stylesheet.rb
sprout-as3-bundle-1.0.21 lib/sprout/tasks/mxmlc_stylesheet.rb
sprout-as3-bundle-1.0.20 lib/sprout/tasks/mxmlc_stylesheet.rb
sprout-as3-bundle-0.2.9 lib/sprout/tasks/mxmlc_stylesheet.rb
sprout-as3-bundle-1.0.14 lib/sprout/tasks/mxmlc_stylesheet.rb
sprout-as3-bundle-1.0.10 lib/sprout/tasks/mxmlc_stylesheet.rb
sprout-as3-bundle-1.0.12 lib/sprout/tasks/mxmlc_stylesheet.rb
sprout-as3-bundle-1.0.23 lib/sprout/tasks/mxmlc_stylesheet.rb
sprout-as3-bundle-1.0.9 lib/sprout/tasks/mxmlc_stylesheet.rb
sprout-as3-bundle-1.0.24 lib/sprout/tasks/mxmlc_stylesheet.rb
sprout-as3-bundle-1.0.8 lib/sprout/tasks/mxmlc_stylesheet.rb
sprout-as3-bundle-1.0.22 lib/sprout/tasks/mxmlc_stylesheet.rb