rstacruz / sinatra-assetpack

Package your assets transparently in Sinatra.
http://ricostacruz.com/sinatra-assetpack/
MIT License
542 stars 96 forks source link

Stylus auto-recompiling does not support imported stylesheets. #188

Open rzhou186 opened 9 years ago

rzhou186 commented 9 years ago

I am using Sinatra Assetpack alongside Ruby Stylus (i.e., I gem 'stylus', :require => 'stylus/tilt' in my Gemfile, then serve '/css', :from => 'public/styl' in my assets block).

Say I serve a stylesheet via css :main, ['/css/layouts/main.css']. Here, main.css is compiled from main.styl. When I modify any line directly within main.styl, sinatra-assetpack auto-recompiles a new version of, say, main.849289.css.

However, when I modify any stylesheet imported by main.styl (via @import), this auto-recompiling doesn't seem to take place. In other words, it seems like Sinatra Assetpack's Stylus auto-recompiling doesn't support nested stylesheets.

Any tips on how to fix this? Thanks so much!

rzhou186 commented 9 years ago

Ah, looks like this issue has cropped up before: https://github.com/rstacruz/sinatra-assetpack/issues/52, https://github.com/rstacruz/sinatra-assetpack/issues/139, https://github.com/rstacruz/sinatra-assetpack/issues/102. And that it's not just a problem with supporting Stylus, but also a problem with supporting other CSS preprocessors.