Page MenuHomePhabricator

Add support for pre-processing in debug mode
Closed, InvalidPublic

Description

To support languages like SASS and LESS (and possibly similar ones for JavaScript), implement a optional compilation step for debug mode. This would compile to the browser language (e.g. CSS) without minification.

This would be similar to the existing ResourceLoader::filter, but apply in debug mode. It might make sense to use some kind of OOP approach with e.g. a ResourceLoaderLanguage class with getProductionCode and getDebugCode methods (the latter of which would be trivial for actual CSS and JS). That could handle the existing filters and this new pre-processing.


Version: 1.22.0
Severity: enhancement

Details

Reference
bz46546

Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 1:18 AM
bzimport set Reference to bz46546.
bzimport added a subscriber: Unknown Object (MLST).
Krinkle claimed this task.

ResourceLoader doesn't need implementation for individual pre-processors for debug mode. Pre-processors should not (and afaik do not) minify by default (not in our configuration anyway). In debug mode, ResourceLoader serves modules (regardless of whether they are produced from reading wiki pages from the database, or by processing css from disk through LESS) via separate load.php requests where the minifier doesn't run.