sprockets

https://github.com/rails/sprockets

Ruby

Rack-based asset packaging system

Sprockets::Exporting#register_exporter

Public: Registers a new Exporter `klass` for `mime_type`.

If your exporter depends on one or more other exporters you can
specify this via the `depend_on` keyword.

    register_exporter '*/*', Sprockets::Exporters::ZlibExporter

This ensures that `Sprockets::Exporters::File` will always execute before
`Sprockets::Exporters::Zlib`

Source | Google | Stack overflow

Edit

git clone [email protected]:rails/sprockets.git

cd sprockets

open lib/sprockets/exporting.rb

Contribute

# Make a new branch

git checkout -b -your-name--update-docs-Sprockets--Exporting-register_exporter-for-pr


# Commit to git

git add lib/sprockets/exporting.rbgit commit -m "better docs for Sprockets::Exporting#register_exporter"


# Open pull request

gem install hub # on a mac you can `brew install hub`

hub fork

git push <your name> -your-name--update-docs-Sprockets--Exporting-register_exporter-for-pr

hub pull-request


# Celebrate!