wycats / rake-pipeline-web-filters

MIT License
116 stars 36 forks source link

SassFilter doesn't rebuild imported files #11

Closed dudleyf closed 12 years ago

dudleyf commented 12 years ago

Typical usage of the SassFilter is to match a single file and use Sass's @imports to load additional sass files. Unfortunately, when we do this, rakep knows nothing of the imported files and won't rebuild when one changes.

dudleyf commented 12 years ago

We could probably walk the Sass syntax tree and pick out the imports, then add them as prerequisites when we generate the rake tasks, but is there a more general way to solve this for other filters that may depend on files that rakep doesn't know about?

bstaats commented 12 years ago

Matching the individual files appears to trigger rakep

match /scss/{layout,color,main}*.scss do filter sass concat 'main.css' end

dudleyf commented 12 years ago

It will, but that will use rakep's concat to concat the files instead of Sass's imports. I think with that (if you're still using @import, too), you would end up with multiple copies of layout.scss and color.scss in main.css.

dudleyf commented 12 years ago

This was fixed in eafd14726698fd8eadb8f14921557942882f5c52.