lucasmazza/ruby-stylus — Issue #13: Make @import Files A Sprockets Dependency
Author: metaskills
Created: 2011-11-23 01:06:00+00:00
State: open

I have not used stylus, but thought you may like to see how I made the less-rails gem make all `@import`'ed files an automatic dependency. It was really easy with a simple sprockets preprocessor. Here is mine.

https://github.com/metaskills/less-rails/blob/master/lib/less/rails/import_processor.rb

In my initializer, I do something like this.

```ruby
app.assets.register_preprocessor 'text/css', ImportProcessor
```