No release in over 3 years
Low commit activity in last 3 years
Adds multiple exporters to Sprockets
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 1.14
>= 10.0

Runtime

>= 0.2.0
>= 4.0.0.beta3
 Project Readme

Sprockets::ExportersPack

This gem aims to add some exporters to sprockets.

Currently, it has:

  • a Brotli exporter, which can be used with ngx_brotli.

Installation

Add this line to your Gemfile:

gem 'sprockets-exporters_pack'

You probably need these too, as sprockets hasn't been updated yet:

gem 'sprockets', '>= 4.0.0.beta3', github: 'rails/sprockets'
gem 'sprockets-rails', '>= 3.1.0'
$ bundle install

Usage

With Rails, in application.rb:

config.assets.configure do |env|
  env.register_exporter %w(text/css application/javascript image/svg+xml), Sprockets::ExportersPack::BrotliExporter
end

Without Rails:

env = Sprockets::Environment.new
env.register_exporter %w(text/css application/javascript image/svg+xml), Sprockets::ExportersPack::BrotliExporter

Contributing

Yes please! Open an issue with exporters you want to see added.

License

The gem is available as open source under the terms of the MIT License.