welaika/wordless — Issue #57: Per-theme preprocessor preference
Author: emzo
Created: 2012-02-27 15:22:58+00:00
State: open

I've been playing around with adding a new preprocessor for LESS files. This got me thinking about how best to specify which preprocessor should be used for each type of asset. I imagine this would be a preference you could set in theme/config/initializers/wordless_preferences.php, but what would be the preferred way of specifying the processors?

1. A simple array specified in a single preference, for example:
* `Wordless::set_preference("assets.preprocessors", array("SprocketsPreprocessor", "CompassPreprocessor"));`
2. Or maybe a separate preference for each asset type:
* `Wordless::set_preference("preprocessors.css", "CompassPreprocessor");`
* `Wordless::set_preference("preprocessors.js", "SprocketsPreprocessor");`
3. Or as above, but with the generated asset type coming first, like:
* `Wordless::set_preference("css.preprocessor", "CompassPreprocessor");`
* `Wordless::set_preference("js.preprocessor", "SprocketsPreprocessor");`