Assuming this is distributed as a ruby gem
gem install my_app_integration
compass init -r my_app_integration my_app_integration path/to/application
module MyAppIntegration | |
extend self | |
class Installer < Compass::Installers::ManifestInstaller | |
def completed_configuration | |
@completed_configuration ||= MyAppIntegration.configuration | |
end | |
# do special install stuff here | |
# like installing package manifests, etc. | |
def write_configuration_files | |
super | |
end | |
def install_stylesheet(from, to, options) | |
super(from, to, options) | |
end | |
end | |
module ConfigurationDefaults | |
def default_javascripts_dir | |
"js" | |
end | |
def default_sass_dir | |
"sass" | |
end | |
def default_css_dir | |
"css" | |
end | |
def default_fonts_dir | |
"fonts" | |
end | |
end | |
def installer(*args) | |
Installer.new(*args) | |
end | |
def configuration | |
Compass::Configuration::Data.new('my_app_integration'). | |
extend(ConfigurationDefaults) | |
end | |
end | |
Compass::AppIntegration.register(:my_app_integration, "MyApp") |
And if your ruby gem has a file in the lib directory named "compass-*.rb" then it will be auto required -- no need to pass the -r option to compass.