Class: Compass::Installers::ManifestInstaller

### Home Classes Methods

### In Files

- lib/compass/app_integration/stand_alone/installer.rb
- lib/compass/installers/manifest_installer.rb

### Parent

Compass::Installers::Base

### Methods

- ::new
- #init
- #install
- #manifest_file
- #stylesheet_links

### Class/Module Index

Quicksearch

- Compass
- Compass::Actions
- Compass::AppIntegration
- Compass::AppIntegration::Helpers
- Compass::AppIntegration::StandAlone
- Compass::AppIntegration::StandAlone::ConfigurationDefaults
- Compass::AppIntegration::StandAlone::Installer
- Compass::Commands
- Compass::Commands::Base
- Compass::Commands::CleanProject
- Compass::Commands::CleanProjectOptionsParser
- Compass::Commands::CompileProjectOptionsParser
- Compass::Commands::ConfigurationOptionsParser
- Compass::Commands::CreateProject
- Compass::Commands::CreateProjectOptionsParser
- Compass::Commands::Default
- Compass::Commands::DefaultOptionsParser
- Compass::Commands::ExtensionCommand
- Compass::Commands::ExtensionOptionsParser
- Compass::Commands::ExtensionsOptionParser
- Compass::Commands::Help
- Compass::Commands::HelpOptionsParser
- Compass::Commands::Imports
- Compass::Commands::InstallerCommand
- Compass::Commands::Interactive
- Compass::Commands::InteractiveOptionsParser
- Compass::Commands::ListFrameworks
- Compass::Commands::PrintVersion
- Compass::Commands::ProjectBase
- Compass::Commands::ProjectStats
- Compass::Commands::Registry
- Compass::Commands::Sprite
- Compass::Commands::SpriteOptionsParser
- Compass::Commands::StampPattern
- Compass::Commands::StampPatternOptionsParser
- Compass::Commands::StatsOptionsParser
- Compass::Commands::StructureOptionsParser
- Compass::Commands::UnpackExtension
- Compass::Commands::UpdateProject
- Compass::Commands::ValidateProject
- Compass::Commands::ValidationOptionsParser
- Compass::Commands::VersionOptionsParser
- Compass::Commands::WriteConfiguration
- Compass::Compiler
- Compass::Configuration
- Compass::Configuration::Comments
- Compass::Configuration::Data
- Compass::Configuration::FileData
- Compass::Configuration::Helpers
- Compass::Configuration::Serialization
- Compass::Deprecation
- Compass::Exec
- Compass::Exec::CommandOptionParser
- Compass::Exec::GlobalOptionsParser
- Compass::Exec::Helpers
- Compass::Exec::ProjectOptionsParser
- Compass::Exec::SubCommandUI
- Compass::FilesystemConflict
- Compass::Installers
- Compass::Installers::BareInstaller
- Compass::Installers::Base
- Compass::Installers::Manifest
- Compass::Installers::Manifest::Entry
- Compass::Installers::ManifestInstaller
- Compass::Installers::TemplateContext
- Compass::Logger
- Compass::MissingDependency
- Compass::NullLogger
- Compass::SassCompiler
- Compass::SassExtensions
- Compass::SassExtensions::Functions
- Compass::SassExtensions::Functions::SassDeclarationHelper
- Compass::SassExtensions::Functions::Sprites
- Compass::SassExtensions::Functions::Sprites::VariableReader
- Compass::SassExtensions::Sprites
- Compass::SassExtensions::Sprites::ChunkyPngEngine
- Compass::SassExtensions::Sprites::Engine
- Compass::SassExtensions::Sprites::Image
- Compass::SassExtensions::Sprites::ImageMethods
- Compass::SassExtensions::Sprites::ImageRow
- Compass::SassExtensions::Sprites::Images
- Compass::SassExtensions::Sprites::Layout
- Compass::SassExtensions::Sprites::Layout::Diagonal
- Compass::SassExtensions::Sprites::Layout::Horizontal
- Compass::SassExtensions::Sprites::Layout::Smart
- Compass::SassExtensions::Sprites::Layout::SpriteLayout
- Compass::SassExtensions::Sprites::Layout::Vertical
- Compass::SassExtensions::Sprites::LayoutMethods
- Compass::SassExtensions::Sprites::RowFitter
- Compass::SassExtensions::Sprites::SpriteMap
- Compass::SassExtensions::Sprites::SpriteMethods
- Compass::SpriteException
- Compass::SpriteImporter
- Compass::Sprites
- Compass::Sprites::Binding
- Compass::Stats
- Compass::Stats::CssFile
- Compass::Stats::SassFile
- Compass::Stats::StatsVisitor
- Compass::TestCase
- Compass::Version
- Sass
- Sass::Script
- Sass::Script::Functions
- QuickCache

No matching classes.

# Compass::Installers::ManifestInstaller

### Attributes

manifest[RW]

### Public Class Methods

new(template_path, target_path, options = {}) click to toggle source

    # File lib/compass/installers/manifest_installer.rb, line 8
    def initialize(template_path, target_path, options = {})
      super
      @manifest = Manifest.new(manifest_file, options) if template_path
    end

### Public Instance Methods

init() click to toggle source

Initializes the project to work with compass

    # File lib/compass/installers/manifest_installer.rb, line 18
    def init
      dirs = manifest.map do |entry|
        unless entry.type == :directory
          loc = send("install_location_for_#{entry.type}", entry.to, entry.options)
          File.dirname(loc)
        end
      end.compact

      if manifest.has_stylesheet?
        dirs << sass_dir
        dirs << css_dir
      end

      dirs.uniq.sort.each do |dir|
        directory targetize(dir)
      end
    end

install() click to toggle source

The default install method. Calls install_<type> methods in the order specified by the manifest.

    # File lib/compass/installers/manifest_installer.rb, line 37
    def install
      manifest.each do |entry|
        send("install_#{entry.type}", entry.from, entry.to, entry.options)
      end
    end

manifest_file() click to toggle source

    # File lib/compass/installers/manifest_installer.rb, line 13
    def manifest_file
      @manifest_file ||= File.join(template_path, "manifest.rb")
    end

stylesheet_links() click to toggle source

    # File lib/compass/installers/manifest_installer.rb, line 43
    def stylesheet_links
      html = "<head>\n"
      manifest.each_stylesheet do |stylesheet|
        # Skip partials.
        next if File.basename(stylesheet.from)[0..0] == "_"
        media = if stylesheet.options[:media]
          %{ media="#{stylesheet.options[:media]}"}
        end
        ss_line = %{  <link href="#{http_stylesheets_path}/#{stylesheet.to.sub(/\.s[ac]ss$/,'.css')}"#{media} rel="stylesheet" type="text/css" />}
        if stylesheet.options[:condition]
          ss_line = "  <!--[if #{stylesheet.options[:condition]}]>\n    #{ss_line}\n  <![endif]-->"
        end
        html << ss_line + "\n"
      end
      html << "</head>"
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.