Sha256: 32f9d07f339cf592269c64b28b0d8f77558fca665a57eac222e440ad6a3e40d7

Contents?: true

Size: 1.34 KB

Versions: 26

Compression:

Stored size: 1.34 KB

Contents

=begin
Copyright 2013 Andrey “A.I.” Sitnik <andrey@sitnik.ru>,
sponsored by Evil Martians.

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.
=end

begin
  require 'sprockets/railtie'

  module AutoprefixedRails
    class Railtie < ::Rails::Railtie
      rake_tasks do |app|
        require 'rake/autoprefixer_tasks'
        Rake::AutoprefixerTasks.new(browsers(app))
      end

      initializer :setup_autoprefixer do |app|
        AutoprefixerRails.install(app.assets, browsers(app))
      end

      # Read browsers requirements from application config
      def browsers(app)
        file   = app.root.join('config/autoprefixer.yml')
        config = file.exist? ? YAML.load_file(file) : { 'browsers' => nil }
        config['browsers']
      end
    end
  end
rescue LoadError
end

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
autoprefixer-rails-0.8.20131205 lib/autoprefixer-rails/railtie.rb
autoprefixer-rails-0.8.20131104 lib/autoprefixer-rails/railtie.rb
autoprefixer-rails-0.8.20131029 lib/autoprefixer-rails/railtie.rb
autoprefixer-rails-0.8.20131020 lib/autoprefixer-rails/railtie.rb
autoprefixer-rails-0.8.20131017 lib/autoprefixer-rails/railtie.rb
autoprefixer-rails-0.8.20131015 lib/autoprefixer-rails/railtie.rb
autoprefixer-rails-0.8.20131009 lib/autoprefixer-rails/railtie.rb
autoprefixer-rails-0.8.20131007 lib/autoprefixer-rails/railtie.rb
autoprefixer-rails-0.8.20131006 lib/autoprefixer-rails/railtie.rb
autoprefixer-rails-0.8.20131001 lib/autoprefixer-rails/railtie.rb
autoprefixer-rails-0.8.20130923 lib/autoprefixer-rails/railtie.rb
autoprefixer-rails-0.8.20130919 lib/autoprefixer-rails/railtie.rb
autoprefixer-rails-0.8.20130911 lib/autoprefixer-rails/railtie.rb
autoprefixer-rails-0.8.20130906 lib/autoprefixer-rails/railtie.rb
autoprefixer-rails-0.8.20130903 lib/autoprefixer-rails/railtie.rb
autoprefixer-rails-0.8.20130902 lib/autoprefixer-rails/railtie.rb
autoprefixer-rails-0.7.20130824 lib/autoprefixer-rails/railtie.rb
autoprefixer-rails-0.7.20130810 lib/autoprefixer-rails/railtie.rb
autoprefixer-rails-0.7.20130808 lib/autoprefixer-rails/railtie.rb
autoprefixer-rails-0.7.20130807 lib/autoprefixer-rails/railtie.rb