module Sprockets::Engines

‘Engines` provides a global and `Environment` instance registry.

An engine is a type of processor that is bound to an filename extension. ‘application.js.coffee` indicates that the `CoffeeScriptTemplate` engine will be ran on the file.

Extensions can be stacked and will be evaulated from right to left. ‘application.js.coffee.erb` will first run `ERBTemplate` then `CoffeeScriptTemplate`.

All ‘Engine`s must follow the `Tilt::Template` interface. It is recommended to subclass `Tilt::Template`.

Its recommended that you register engine changes on your local ‘Environment` instance.

environment.register_engine '.foo', FooProcessor

The global registry is exposed for plugins to register themselves.

Sprockets.register_engine '.sass', SassTemplate