wycats/rake-pipeline-web-filters — Issue #19: SassFilter only works if its input files exist
Author: dudleyf
Created: 2012-02-21 20:48:38+00:00
State: open

The SassFilter will only work if its input files exist when the pipeline gets setup. If the SassFilter is the first filter in the pipeline, then the input root is the original source file, so it exists, so it can be read to extract its dependencies. If another filter matches the same input before the SassFilter, however, then the file's input root will be a temporary directory, and the file won't be there until the pipeline is actually invoked. The SassFilter needs to read the file at setup time, not at invoke time.

For example:

```ruby
input "app/assets" do
match("stylesheets/app.scss") do
sass
end
end
```

works. The SassFilter reads `app/assets/stylesheets/app.scss` when the pipeline is setup. This:

```ruby
input "app/assets" do
match("stylesheets/app.scss") do
copy
sass
end
end
```

dies horribly because the SassFilter is trying to read `my-tmp-dir/rake-pipeline-tmp-1/stylesheets/app.scss`, which isn't created until the pipeline is invoked.