Sha256: a2a095edcc3eeaede24bb92c495ee9efc452aa26b906423da10d206fc86bc621
Contents?: true
Size: 930 Bytes
Versions: 1
Compression:
Stored size: 930 Bytes
Contents
SASS_INIT = (<<-SASS).gsub(/^ {10}/, '') unless defined?(SASS_INIT) # Enables support for SASS template reloading in rack applications. # See http://nex-3.com/posts/88-sass-supports-rack for more details. # Store SASS files (by default) within 'app/stylesheets' module SassInitializer def self.registered(app) require 'sass/plugin/rack' Sass::Plugin.options[:template_location] = Padrino.root("app/stylesheets") Sass::Plugin.options[:css_location] = Padrino.root("public/stylesheets") app.use Sass::Plugin::Rack end end SASS SASS_REGISTER = (<<-SASSR).gsub(/^ {10}/, '') unless defined?(SASS_REGISTER) register SassInitializer\n SASSR def setup_stylesheet require_dependencies 'haml' create_file destination_root('/lib/sass_plugin.rb'), SASS_INIT inject_into_file destination_root('/app/app.rb'), SASS_REGISTER, :after => "configure do\n" empty_directory destination_root('/app/stylesheets') end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
padrino-gen-0.9.10 | lib/padrino-gen/generators/components/stylesheets/sass.rb |