reworkcss/css-whitespace — pull request #19 by clintwood (2014-03-16 11:38:24+00:00)
Title: Graceful @import Importer / Resolver support...

A 'slight' refactor of the processing pipeline to allow handling of ```@import path``` rules. The API allows passing in an optional ```@import``` resolver like [this](https://github.com/clintwood/css-whitespace/blob/importer/examples/import/index.js) and could look like [this example resolver](https://github.com/clintwood/css-whitespace/blob/importer/examples/import/styl-resolver.js).

The refactor does not break the existing API or hurt performance and purely provides a hook for ```@import rules```. What you do with it is up to you...

There is no builtin resolver but the example [styl-resolver.js](https://github.com/clintwood/css-whitespace/blob/importer/examples/import/styl-resolver.js) can be a starting point for node based file resolver. There is no browser based example at this point but should be equally easy to implement.

Graceful, because the resolver can optionally return ```null``` which will cause the original ```@import "blaa.css"``` to be output. It is up to the resolver implementer to determine if failing to resolve the ```path``` passed to the supplied resolver callback is an error or not...