Skip to content
This repository has been archived by the owner on Jan 23, 2021. It is now read-only.

Fix sass cacheing? #54

Closed
robwierzbowski opened this issue Jun 7, 2014 · 5 comments
Closed

Fix sass cacheing? #54

robwierzbowski opened this issue Jun 7, 2014 · 5 comments

Comments

@robwierzbowski
Copy link
Contributor

I'm taking a guess that sass cacheing isn't working in this plugin currently, because each file is written to the temp directory before processing which gives it a newer file-changed date than the cached file.

Can't think of a fix for this off the top of my head — using gulp-changed would work for files that no other files depend on, but without knowing the dependency tree I'm not sure how to handle a file containing a mixin that unchanged files depend on (like _obj.scss in the test files). Sass probably has this figured out, and it might just work with a combo of -changed, -intermediate, adding the source files to load paths, and a Sass cache in the local root folder.

Some docs on sass-caching: https://twitter.com/nex3/status/475324934491602945

@sindresorhus
Copy link
Owner

Could preserve the mtime on the temp'd files.

@robwierzbowski
Copy link
Contributor Author

That might be easier :).

@robwierzbowski
Copy link
Contributor Author

I got caching working with the intermediate plugin, but only when specifying a constant OS tempDir (makes sense). I could add a third argument or option to the intermediate function to specify a specific tempDir relative to the OS temp directory if you decide you'd like to switch over.

@sindresorhus
Copy link
Owner

@robwierzbowski nah, i think constant temp dir is alright.

@robwierzbowski
Copy link
Contributor Author

I'll need the specific tempDir arg to make a constant tempdir, but I gotcha. PRs to this and the other issue on the way, maybe this weekend.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants