appleboy/gulp-compass — pull request #73 by quaderi (2014-10-16 22:31:33+00:00)
Title: Filepath Bug Fix + Nonblocking Filereads

**Filepath Bug Fix**
Previously, the filepath was being changed incorrectly. The extension was being changed from the existing filepath (which pointed to the sass files). The new filepath should actually point to the output file which is in the css directory. I've also moved the code to change the extension into the compass library because otherwise the path passed down to the callback in index doesn't refer to any actual file.

I suspect this might fix some of the issues people have been running into:
https://github.com/appleboy/gulp-compass/issues/15
https://github.com/appleboy/gulp-compass/issues/49

This also seems to fix other issues that arise when you pipe to other gulp packages (e.g. gulp-rename) that rely on the vinyl path being correct.

**Non-blocking File-reads**
The current approach to reading the CSS files outputted by compass is using fs.readFileSync.
readFileSync should never be called on a node webserver since it blocks the only node thread while I/O is being performed. Changing this code to use fs.readFile which is the asynchronous (non-blocking) version of the function is really straightforward here. Since gulp tasks are meant to be asynchronous in nature, it's just a matter of calling the callback from readFile's own callback.