Closed Snugug closed 9 years ago
@akhleung @am11 @andrew @dlmanning thoughts on why this may be happening?
@Jakobo @chriseppstein too
@Snugug, that was due to https://github.com/sass/node-sass/pull/615. A temporary hack which is supposed to be fixed in v3 stable.
BTW, you can search node-sass issue tracker to figure out this kind of thing..
Didn't quite know what I was looking for there, haven't seen many people doing things with custom importers. Thanks!
As an aside, the code as written also has some issues. Since the importedFiles
is loaded once for the module, multiple calls to node-sass
with this importer will reuse the object literal.
This is a known bug in eyeglass. The addition of a context object (v3) should make it possible to maintain a per-render
cache inside of the this
keyword. It'll actually trip you up in any build pipeline, since gulp/grunt/broccoli/etc just reuse the same options file each time.
function importer(uri, prev, done) {
var isRealFile = fs.existsSync(prev),
file;
// new!
if (!this._importOnceCache) {
this._importOnceCache = {};
}
// ...
Ooo, like. I was just running simple things trying to get a basic version of this out, but I'll circle back to that. Thanks!
@snugug there's no need to mention everyone involved, anyone who's watching the repo will get an email about new issues and comments.
Yah, my brain wasn't functioning last night when I wrote those issues, sorry about that. Thought I would as no one was watching this repo at the time.
On Mar 14, 2015, at 4:41 AM, Andrew Nesbitt notifications@github.com wrote:
@snugug there's no need to mention everyone involved, anyone who's watching the repo will get an email about new issues and comments.
— Reply to this email directly or view it on GitHub.
When run successfully, the object passed to
done()
getsconsole.log
'd out, even without me doing so. Not sure if it's related togulp-sass
ornode-sass